diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2019-11-21 12:57:59 +0100 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2019-11-21 12:57:59 +0100 |
commit | 15ebcc764c30c18f41f179d589ad1ad5a45194f1 (patch) | |
tree | e83ebfbd8b2dc5e8524bf3fd647f55b9b8702941 /Compiler.hs | |
parent | d4c554f62b007df2763c73ba7fd2b13814c186bc (diff) |
Better string and IO support
Diffstat (limited to 'Compiler.hs')
-rw-r--r-- | Compiler.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Compiler.hs b/Compiler.hs index 347eb4a..b7f5639 100644 --- a/Compiler.hs +++ b/Compiler.hs @@ -86,9 +86,11 @@ newtype CM a = CM {unCM :: StateT CompState (Except String) a} -- TODO: extra info like number of arguments, dunno, might be useful builtinSet :: Set.Set Name builtinSet = Set.fromList [ - "+", "-", "<=", "=", "print", + "+", "-", "*", "/", "mod", "<=", "=", "print", "list", "car", "cdr", "null?", - "sys-open-file", "sys-close-file", "sys-get-char", "sys-put-string"] + "sys-open-file", "sys-close-file", "sys-get-char", "sys-put-string", "sys-flush", + "sys-stdin", "sys-stdout", "sys-stderr", + "length", "substr", "ord", "chr", "concat"] bbId :: BB -> Int bbId (BB i _ _) = i |