Open Negabinary opened 4 months ago
hmm.. would need to decide what the error should be. the example shown doesn't seem fatally problematic, in that even if someone believed X gets bound by the let, it would still have the same result. but if the type had another constructor say Y of the same type, then it would be more confusing. in principle though in such cases would have refutable pattern errors, assuming it's possible to do refutability for arrow typed things
probably just an arity error for constructors in patterns would do it?
It's probably more problematic in a case statement:
An arity error would probably do it; we just need to pass some sort of "expected arity" through pattern statics
not sure we need any more information. we know constructor arities from types in ctx. so:
This example should ideally have a static error on the X because it doesn't have an argument.
@disconcision I wonder if you have any ideas how to do this?