panic when bang is misplaced: tc_hs_type: bang
The following file makes ghc panic:
% cat t.hs
newtype Scale = Scale (!Maybe Int)
% ghc -c t.hs
ghc: panic! (the 'impossible' happened)
(GHC version 7.6.1 for x86_64-apple-darwin):
tc_hs_type: bang
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
I should have written 'Scale (!(Maybe Int))', but ghc should tell me so instead of crashing. Actually, come to think of it, why isn't '!Maybe Int' valid if it has no possible interpretation other than '!(Maybe Int)'?
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 |