hazelgrove / hazel

Hazel, a live functional programming environment with typed holes
http://hazel.org/
MIT License
748 stars 50 forks source link

ADT Dynamics example is broken (Exhaustiveness/Redundancy) #1319

Open disconcision opened 3 months ago

disconcision commented 3 months ago

It claims that cases are redundant and inexhaustive where they're not.

Also separately I'm not sure about how we're localizing the inexhaustive error for lets... check out the other documentation editors, they are hard to read. Putting it on the pattern makes more sense to me in this case.

cyrus- commented 3 months ago

related to #1318?

disconcision commented 3 months ago

ah probably that. any thoughts about the separate issue?

cyrus- commented 3 months ago

We could put it on the top-level pattern if you want. For case expressions, it appears on the case as a whole, so I think the error being on the let was by analogy there.

disconcision commented 3 months ago
Screenshot 2024-07-05 at 4 28 28 PM

(a somewhat artificial example but worth changing i think)

i feel like the let case should probably have a distinct error message as well since how you address such an error is different than the match case

cyrus- commented 3 months ago

sure, agreed -- can you make a separate issue