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 5fd2518..2953227 100644
--- a/AST.hs
+++ b/AST.hs
@@ -13,6 +13,7 @@ data Value
| VString String
| VName Name
| VQuoted Value
+ | VDeclare Name
| VDefine Name Value
| VLambda [Name] Value
| VLambdaRec Name [Name] Value
@@ -31,6 +32,7 @@ instance Show Value where
show (VString s) = show s
show (VName n) = n
show (VQuoted e) = '\'' : show e
+ show (VDeclare n) = "(declare " ++ n ++ ")"
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 ++ ")"