Reputation: 4402
I've managed to construct the following "minimal" example that shows my problem.
Provided the PatternSynonyms extension is enabled
data Vec = Vec Int Int
pattern Ve x y = Vec x y
f :: (Vec, Vec) -> Vec
f (v@(Ve a b), Ve c d)
| a > b = Vec c d
| otherwise = v
I get a warning for the function f saying
Warning: Pattern match(es) are non-exhaustive
In an equation for `f': Patterns not matched: (_, _)
If I replaced every Ve
with Vec
it wouldn't complain.
How does my singular pattern synonym interfere here?
Upvotes: 17
Views: 839