aboutsummaryrefslogtreecommitdiff
path: root/backend/CC/Backend
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2020-07-26 09:30:26 +0200
committerTom Smeding <tom.smeding@gmail.com>2020-07-26 09:30:26 +0200
commit494b764274be4db53499fa4eb7decacb93c7bbe9 (patch)
treec8966de4c992ef9755a310435500c475814eae96 /backend/CC/Backend
parent0503dcb2998ab9dcd0f39e6f264f482a3d2cc7f7 (diff)
Builtins is a Map
Diffstat (limited to 'backend/CC/Backend')
-rw-r--r--backend/CC/Backend/Dumb.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/backend/CC/Backend/Dumb.hs b/backend/CC/Backend/Dumb.hs
index 7982a06..3210dab 100644
--- a/backend/CC/Backend/Dumb.hs
+++ b/backend/CC/Backend/Dumb.hs
@@ -1,11 +1,13 @@
module CC.Backend.Dumb(builtins) where
+import qualified Data.Map.Strict as Map
+
import CC.AST.Typed
import CC.Context
builtins :: Builtins
-builtins = Builtins
+builtins = Builtins . Map.fromList $
[ ("print", TFun TInt (TTup []))
, ("fst", TFun (TTup [TyVar 1, TyVar 2]) (TyVar 1))
, ("snd", TFun (TTup [TyVar 1, TyVar 2]) (TyVar 2))