summaryrefslogtreecommitdiff
path: root/Compiler.hs
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2019-11-21 12:57:59 +0100
committerTom Smeding <tom.smeding@gmail.com>2019-11-21 12:57:59 +0100
commit15ebcc764c30c18f41f179d589ad1ad5a45194f1 (patch)
treee83ebfbd8b2dc5e8524bf3fd647f55b9b8702941 /Compiler.hs
parentd4c554f62b007df2763c73ba7fd2b13814c186bc (diff)
Better string and IO support
Diffstat (limited to 'Compiler.hs')
-rw-r--r--Compiler.hs6
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