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 eae5af8..df946dd 100644
--- a/AST.hs
+++ b/AST.hs
@@ -14,6 +14,7 @@ data Value
| VName Name
| VQuoted Value
| VLambda [Name] Value
+ | VLet [(Name, Value)] Value
| VBuiltin String
| VEllipsis
deriving (Eq)
@@ -29,6 +30,7 @@ instance Show Value where
show (VName n) = n
show (VQuoted e) = '\'' : show e
show (VLambda as v) = "(lambda (" ++ 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 = "..."