[ ghc-Bugs-416885 ] Bad Beta Expand and the Impossible

noreply@sourceforge.net noreply@sourceforge.net
Tue, 17 Apr 2001 16:40:58 -0700


Bugs item #416885, was updated on 2001-04-17 16:40
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=108032&aid=416885&group_id=8032

Category: Compiler
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jeffrey R. Lewis (lewie)
Assigned to: Nobody/Anonymous (nobody)
Summary: Bad Beta Expand and the Impossible

Initial Comment:
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.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=108032&aid=416885&group_id=8032