tc_hs_type: bang : The impossible happened
A simple data structure with bang patterns like the following:
data MyType
= MyType
{ a :: !Int
, b :: !Maybe Int
}
results in:
ghc: panic! (the 'impossible' happened)
(GHC version 7.6.1 for x86_64-unknown-linux):
tc_hs_type: bang
Adding parentheses around the "Maybe Int" like this:
data MyType
= MyType
{ a :: !Int
, b :: !(Maybe Int)
}
is accepted, but it would be nice if the former example printed a syntax error or some sort of other warning rather than just a panic.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.6.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |