Bad Beta Expand and the Impossible
Bad things happen with the following program, in
combination with -O2 -funfolding-use-threshold30
-funbox-strict-fields
import Parsec
data GMLToken = TBody ()
token :: Parser GMLToken
token = do { return (TBody undefined) }
GHC 5.0 sez:
Bad eta expand
ParsecError.zdwParseError{-rj0-}
ww1{-rls-} (PrelBase.zdwZMZN{-6n-} @
ParsecError.Message{-rj8-})
ParsecError.ParseError{-rgd-}
Bad eta expand
Parsec.zdwState{-rcs-} ww{-rlt-} ww1{-rls-}
Parsec.State{-rct-}
Bad eta expand
Parsec.zdwOk{-rcz-}
@ Parse.GMLToken{-r2-} w{-rlr-} tpl{-rlq-}
a1{-rlp-}
Parsec.Reply{-rcB-} Parse.GMLToken{-r2-}
ghc-5.00: panic! (the `impossible' happened, GHC
version 5.00):
/tmp/ghc8815.lpp:1469: Non-exhaustive patterns in
function cat_evals
Deleting any of the options makes the problem go away.
Trac metadata
| Trac field | Value |
|---|---|
| Version | None |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | ResolvedFixed |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |