ghc: panic! (the 'impossible' happened)

José Romildo Malaquias j.romildo at gmail.com
Sun Oct 28 04:55:07 CET 2012


Hello.

Today I wrote a small program to experiment with the Applicative
class. The program is supposed to use an "applicative reader", similar
to a "monad reader", to evaluate arithmetic expressions.

But when compiling the program with ghc-7.6.1, I get the following message:

  $ ghc --make applicative-eval
  [1 of 1] Compiling Main             ( applicative-eval.hs, applicative-eval.o )
  ghc: panic! (the 'impossible' happened)
    (GHC version 7.6.1 for x86_64-unknown-linux):
    expectJust cpeBody:collect_args

  Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

If the line

  eval (Let s a b) = \m -> eval b ((s,eval a m):m)

is commented out, the program compiles without problems.

Is this a known issue with the compiler?

The source code is attached.

Romildo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: applicative-eval.hs
Type: text/x-haskell
Size: 1573 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20121028/e9bc069a/attachment.hs>


More information about the Glasgow-haskell-users mailing list