Hacker News new | past | comments | ask | show | jobs | submit login

I picked head and tail as primary examples, but it's not limited to them. As I discussed in the link I've posted to a discussion yesterday, one can easily create their own incomplete pattern matching by mistake, without the compiler complaining, by using records. eg:

    data List a = Nil | Cons { head :: a, tail :: List a }
I encounter this misfeature of Haskell frequently - records and sum types don't mix, because they lead to an incomplete pattern match in the record fields.

Yes, it's unidiomatic Haskell, but a beginner does not know this, and just because it's conventional to avoid using it, does not mean it isn't still there - anyone could make this mistake.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: