diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2020-07-27 10:32:49 +0200 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2020-07-27 10:32:49 +0200 |
commit | 4c9e6c7dc4468c05553b04ba0c1aca6964dc0f82 (patch) | |
tree | 48a6ec7c60d90a0cd45a600b1963ad3ea6466e8a /backend/CC/Backend | |
parent | 1ac7ba99fc809958ab59ed9b81df6fda7f2dbf05 (diff) |
Diffstat (limited to 'backend/CC/Backend')
-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 |