aboutsummaryrefslogtreecommitdiff
path: root/backend/CC/Backend/Dumb.hs
blob: 7982a06c1a9531edfa32c0c41c1644b1f1fc8e0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
module CC.Backend.Dumb(builtins) where

import CC.AST.Typed
import CC.Context


builtins :: Builtins
builtins = Builtins
    [ ("print", TFun TInt (TTup []))
    , ("fst", TFun (TTup [TyVar 1, TyVar 2]) (TyVar 1))
    , ("snd", TFun (TTup [TyVar 1, TyVar 2]) (TyVar 2))
    , ("_add", TFun TInt (TFun TInt TInt))
    , ("_sub", TFun TInt (TFun TInt TInt))
    , ("_mul", TFun TInt (TFun TInt TInt)) ]