[Haskell-cafe] Ensuring all values of an ADT are explicitly handled OR finding all occurrences of type X in my app
saurabhnanda at gmail.com
Tue Jan 31 02:47:44 UTC 2017
If I have the following ADT
data BookingState = Confirmed | Cancelled
which had a very high chance of being expanded in the future to have more
values. How do I ensure that every pattern match on BookingState matches
each value explicitly. Basically prevent the '_' matcher ?
If that is not possible, is the following possible instead: evolve
BookingState and then find all possible occurrences of values of
BookingState throughout my app?
I'm basically trying to make sure that any a newly added state, which may
require special-case handling is not automatically handled by the '_'
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe