From 494b764274be4db53499fa4eb7decacb93c7bbe9 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Sun, 26 Jul 2020 09:30:26 +0200 Subject: Builtins is a Map --- backend/CC/Backend/Dumb.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'backend/CC/Backend') 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)) -- cgit v1.2.3-70-g09d2