This commit is contained in:
2026-07-05 15:14:17 -06:00
parent 817b7530c1
commit a2c93938ca
5 changed files with 355 additions and 6 deletions
+5 -4
View File
@@ -108,9 +108,10 @@ primSexpIso namefn a = match
$ With (. nullop "newline")
$ End
where
nullop s = list $ el (sym (namefn s))
unop s = list $ el (sym (namefn s)) >>> el a
binop s = list $ el (sym (namefn s)) >>> el a >>> el a
idn s = el (sym (namefn s))
nullop s = list $ idn s
unop s = list $ idn s >>> el a
binop s = list $ idn s >>> el a >>> el a
instance SexpIso a => SexpIso (Prim a) where
sexpIso = primSexpIso ("prim:"<>) sexpIso
@@ -156,6 +157,6 @@ instance SexpIso Exp where
where
if_ = list $ el (sym "if") >>> el sexpIso >>> el sexpIso >>> el sexpIso
lam = list
( el (sym "lambda")
( el Gyehoek.Sexp.lambdaKeyword
>>> el (sexpIso @(List Name))
>>> el sexpIso )