> The following program (rather condensed as it comes from something
> much larger), crashes the compiler. I am using ghc-2.05 on a Solaris
> box, with one or two patches(including the WwLib one which Simon gave
> me, but this error occured before applying this patch).
Thanks for this bug report, and for localising it so well.
It's easily fixed, I'm glad to say.
In
ghc/compiler/simplCore/SimplCore.lhs
replace this equation of tidyCoreExpr. The lines marked "!!" are the
changed ones.
Simon
-- Eliminate polymorphic case, for which we can't generate code just yet
tidyCoreExpr (Case scrut (AlgAlts [] (BindDefault deflt_bndr rhs)))
| not (typeOkForCase (idType deflt_bndr))
= pprTrace "Warning: discarding polymorphic case:" (ppr PprDebug scrut) $
case scrut of
!! Var v -> lookupId v `thenTM` \ v' ->
!! extendEnvTM deflt_bndr v' (tidyCoreExpr rhs)
other -> tidyCoreExpr (Let (NonRec deflt_bndr scrut) rhs)
Re: Compiler Crash: ghc-2.05:panic! lookupBindC:no info!
Simon L Peyton Jones Wed, 3 Sep 1997 14:25:59 +0200 (MET DST)
- Compiler Crash: ghc-2.05:panic! lookupBindC:no info! Jon Mountjoy
- Simon L Peyton Jones
