Open ChrisPenner opened 1 year ago
Thanks for reporting, we could do this during a cooldown week if desired; otherwise feels low priority.
@tstat What would need to happen here?
I expect the pattern match coverage checker to handle empty cases fine as is. I assume that error is from the parser, so maybe all that needs changing is the parser.
Now that we have pattern-match checking we don't have a reasonable way to handle type with no constructors.
For example if I have an empty error type that I need to handle:
This fails to compile:
I can't even use
absurd
here because it's a unique type. So the only option is "bug", but this isn't great because it means Unison won't warn me that I have unhandled cases if I add a new error case in the future.Instead we should consider just allowing empty case statements for types with no constructors (this is what Haskell does)