diff options
Diffstat (limited to 'backend/CC/Backend/Dumb.hs')
-rw-r--r-- | backend/CC/Backend/Dumb.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/backend/CC/Backend/Dumb.hs b/backend/CC/Backend/Dumb.hs index 822fb84..b7703d7 100644 --- a/backend/CC/Backend/Dumb.hs +++ b/backend/CC/Backend/Dumb.hs @@ -17,7 +17,11 @@ builtins = , ("_mul", TInt ==> TInt ==> TInt) ] prelude = "type Nil = ()\n\ \type Cons a = (a, List a)\n\ - \alias List a = { Nil | Cons a }\n" + \alias List a = { Nil | Cons a }\n\ + \cons :: a -> List a -> Cons a\n\ + \cons x l = Cons (x, l)\n\ + \nil :: Nil\n\ + \nil = Nil ()\n" in Builtins values prelude where t1 = TyVar Instantiable 1 |