Closed phadej closed 3 years ago
This is intended behaviour.
I don't agree this is great, as MonthOfYear
is just Int
and there is no (new)type safety net to track provenance of the values, but I won't insist.
Intended as this may be be, I don't agree it's great either and just wanted to record that here.
An example:
Warns about ex1 but not about ex2:
as
type MonthOfYear = Int
this is very questionable. Pattern synonyms itself are fine, but claiming that they are complete forInt
, without any help even from a newtype wrapper is IMHO not a good idea.