From 15ebcc764c30c18f41f179d589ad1ad5a45194f1 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Thu, 21 Nov 2019 12:57:59 +0100 Subject: Better string and IO support --- Compiler.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Compiler.hs') 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 -- cgit v1.2.3-70-g09d2