Improved prelude
This commit is contained in:
parent
7562949909
commit
63fef958a7
1 changed files with 6 additions and 5 deletions
11
src/Main.hs
11
src/Main.hs
|
|
@ -178,12 +178,13 @@ prelude :: String
|
||||||
prelude =
|
prelude =
|
||||||
unlines
|
unlines
|
||||||
[ "\n"
|
[ "\n"
|
||||||
, -- , "customHelperFunctionCuzPoorImplementation : Bool () -> Int -> Bool ()"
|
, "data Bool where"
|
||||||
-- , "customHelperFunctionCuzPoorImplementation x y = x"
|
|
||||||
"data Bool where"
|
|
||||||
, " False : Bool"
|
, " False : Bool"
|
||||||
, " True : Bool"
|
, " True : Bool"
|
||||||
, "lt : Int -> Int -> Bool"
|
, -- The function body of lt is replaced during code gen. It exists here for type checking purposes.
|
||||||
, "lt x y = True"
|
"lt : Int -> Int -> Bool"
|
||||||
|
, "lt x y = case x of"
|
||||||
|
, " _ => True"
|
||||||
|
, " _ => False"
|
||||||
, "\n"
|
, "\n"
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue