summaryrefslogtreecommitdiff
path: root/Compiler.hs
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2019-11-14 16:58:24 +0100
committerTom Smeding <tom.smeding@gmail.com>2019-11-14 16:58:24 +0100
commitd3a9d62b5866771489cdc9f4e0fced3e7845eb9c (patch)
treed5205bc84587d0e4de9c7691691681cb7db48548 /Compiler.hs
parenta3c2420909c41eecbd52c1792bbfb823a49ad04f (diff)
File I/O
Diffstat (limited to 'Compiler.hs')
-rw-r--r--Compiler.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Compiler.hs b/Compiler.hs
index c8771b9..9f8b595 100644
--- a/Compiler.hs
+++ b/Compiler.hs
@@ -75,7 +75,8 @@ newtype CM a = CM {unCM :: StateT CompState (Except String) a}
builtinMap :: Map.Map Name ()
builtinMap = Map.fromList [
("+", ()), ("-", ()), ("<=", ()), ("=", ()), ("print", ()),
- ("list", ()), ("car", ()), ("cdr", ())]
+ ("list", ()), ("car", ()), ("cdr", ()),
+ ("sys-open-file", ()), ("sys-close-file", ()), ("sys-get-char", ()), ("sys-put-string", ())]
bbId :: BB -> Int
bbId (BB i _ _) = i