{-# complete #-} should be able to be at least partially type directed
The fact that {-# complete #-}
pragma that was added in #8779 (closed) is tied to the set of patterns only and not the types involved can make it rather awkward or impossible to use in practice.
Say I have a bunch of types that happen to share a common (:<)
and Empty
pattern, for views. I'd like to be able to say that for one particular type {-# complete (:<), Empty #-}
holds, but since both aren't defined in the same module and neither one mentions my type, I'm stuck in the same -Wno-incomplete-patterns
mess I was in before.
I cant move the pragma to the individual view patterns because in general they aren't known to be a complete pattern set.
Trac metadata
Trac field | Value |
---|---|
Version | 8.2.1 |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler (Type checker) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |