small
This commit is contained in:
@@ -23,6 +23,7 @@ data Prim e
|
||||
| PrimSub e e
|
||||
| PrimMul e e
|
||||
| PrimDiv e e
|
||||
| PrimCons e e
|
||||
deriving (Show, Generic, Functor, Foldable, Traversable)
|
||||
|
||||
instance Each (Prim e) (Prim e') e e'
|
||||
@@ -47,10 +48,11 @@ data Exp
|
||||
|
||||
instance SexpIso a => SexpIso (Prim a) where
|
||||
sexpIso = match
|
||||
$ With (. binop "prim-+")
|
||||
$ With (. binop "prim--")
|
||||
$ With (. binop "prim-*")
|
||||
$ With (. binop "prim-/")
|
||||
$ With (. binop "prim:+")
|
||||
$ With (. binop "prim:-")
|
||||
$ With (. binop "prim:*")
|
||||
$ With (. binop "prim:/")
|
||||
$ With (. binop "prim:cons")
|
||||
$ End
|
||||
where
|
||||
binop s = list $ el (sym s) >>> el sexpIso >>> el sexpIso
|
||||
|
||||
Reference in New Issue
Block a user