Fixed printing bug in MorbIr, fixed Monomorphizer forgetting to output constructors on EInj
This commit is contained in:
parent
3377879dd0
commit
59da6d8864
3 changed files with 17 additions and 1 deletions
12
sample-programs/mono-4.chrf
Normal file
12
sample-programs/mono-4.chrf
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
data Either (a b) where
|
||||
Left : a -> Either (a b)
|
||||
Right : b -> Either (a b)
|
||||
|
||||
unwrap : Either (a a) -> a
|
||||
unwrap x = case x of
|
||||
Left y => y
|
||||
Right y => y
|
||||
|
||||
main : Int
|
||||
main = unwrap (Left 3)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue