Unable to provide type signature for pattern synonym
{-# language
PatternSynonyms
, ViewPatterns
#-}
import Text.Read
pattern PRead a <- (readMaybe -> Just a)
GHC infers the type correctly for PRead but it is impossible provide a signature. See #11224 (closed) for more discussion about why.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.10.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |