diff options
author | tomsmeding <tom.smeding@gmail.com> | 2019-11-26 13:46:29 +0100 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2019-11-26 13:46:29 +0100 |
commit | 5f86130930c19277fbf0ef3433cc43ab93aacf3f (patch) | |
tree | 22c11dc678a6262c44a34630076824f941193043 /AST.hs | |
parent | 9de16e245424e62318cdce4909e33c256f585cb6 (diff) |
declare defines for top-level mutual recursion
Diffstat (limited to 'AST.hs')
-rw-r--r-- | AST.hs | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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 ++ ")" |