I have a clause in a case expression that may never be reached. For example, suppose that the pattern is {a: true, b: true}
and I know that these flags are mutually exclusive. The right way to handle this situation would be to refactor the type model to use a three way switch enumeration type, but it would require a wide refactoring that I cannot afford.
The solution I would reach for in Haskell is error "Unreachable code path"
. Is there a similar «undefined» thingie in PureScript? What is the idiomatic way to mark dead case clauses?
One thing I considered is to return a default value. This is not acceptable, because reaching this branch should ring every alarm and never go unnoticed.