summaryrefslogtreecommitdiff
path: root/AST.hs
diff options
context:
space:
mode:
Diffstat (limited to 'AST.hs')
-rw-r--r--AST.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/AST.hs b/AST.hs
index f8b5e5b..a096227 100644
--- a/AST.hs
+++ b/AST.hs
@@ -15,6 +15,7 @@ data Value
| VQuoted Value
| VDefine Name Value
| VLambda [Name] Value
+ | VLambdaRec Name [Name] Value
| VLet [(Name, Value)] Value
| VBuiltin String
| VEllipsis
@@ -32,6 +33,7 @@ instance Show Value where
show (VQuoted e) = '\'' : show e
show (VDefine n v) = "(define " ++ n ++ " " ++ show v ++ ")"
show (VLambda as v) = "(lambda (" ++ intercalate " " as ++ ") " ++ show v ++ ")"
+ show (VLambdaRec rn as v) = "(lambdarec " ++ rn ++ " (" ++ intercalate " " as ++ ") " ++ show v ++ ")"
show (VLet ps v) = "(let (" ++ intercalate " " ["(" ++ n ++ " " ++ show w ++ ")" | (n, w) <- ps] ++ ") " ++ show v ++ ")"
show (VBuiltin str) = "[[builtin " ++ str ++ "]]"
show VEllipsis = "..."