-
Notifications
You must be signed in to change notification settings - Fork 120
Open
Labels
Description
I know that there is static information wiring that is needed to facilitate this (which I am currently working on implementing), but I wanted to make a note of something we should likely fix once we have the ability to do so. Currently, the following runs without issue:
fun foo(x):
cases(Option) x:
| none => 0
| some(n) => n
| other(f) => f
end
end
Even worse, so does this (spot the bug!):
fun foo(x):
cases(Option) x:
| none => 0
| som(n) => n
end
where:
foo(none) is 0
end
It would be great if we could have some form of error message (even at runtime, if necessary) for things such as these.
(Bonus points if we can have an exhastiveness-checking system like OCaml! 😄)