Pattern synonym signatures are not validity-checked
Ponder this garbage:
{-# LANGUAGE PatternSynonyms, ViewPatterns,
TypeFamilies, KindSignatures #-}
module Bug where
type family F a -- F :: * -> *
data T :: (* -> *) -> *
pattern Q :: T F -> String
pattern Q x <- (undefined -> x)
This is accepted by GHC 8.0.1 and HEAD. But it has an unsaturated type family! Urk!
The problem is that TcSigs.tcPatSynSig never does validity checking.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |