[Haskell-cafe] GHC panic!

Ben Gamari ben at smart-cactus.org
Sat Aug 16 14:09:57 UTC 2014


CCing Michael in case this is something Conduit related that he
recognizes.

Ben Gamari <ben at smart-cactus.org> writes:

> 北原真一 <masakazu.minamiyama at gmail.com> writes:
>
>> I am asking for help I am Haskeller of Japan I'm using GHC7.6.3 GHC has
>> caused the panic
>> https://gist.github.com/minamiyama1994/6697c3fb9c345da6715f
>
> I can reproduce the issue on my end with 7.6.3.  Setting
> -fsimpl-tick-factor=10000 allows the build to proceed. This is a bit odd
> as I don't see anything in your code that should give the simplifier too
> much grief, but I could be missing something.  Unless you intend on
> releasing the code I would probably add a 'Ghc-Options:
> -fsimpl-tick-factor=1000' to your Cabal file for now.
>
That being said, the Core here does look a bit concerning with blocks of
this nature being replicated 255 times (with both tick factors of 1000
and 2000),

    a2_rzJz
    a2_rzJz =
      \ @ a_X7Iy eta_X7IA _ _ eta3_B1 -> (# eta3_B1, eta_X7IA #)
    
    lvl24_rzJA
    lvl24_rzJA =
      IOError (Nothing) NoSuchThing getEnv3 getEnv2 (Nothing) lvl18_rzJs
    
    lvl25_rzJB
    lvl25_rzJB =
      \ @ a_a90p @ b_a90q m_a90r k_a90s r_X93X ->
        let {
          ds_X956
          ds_X956 = (m_a90r `cast` ...) r_X93X } in
        (\ r1_X95b s_X8Wq ->
           case (((ds_X956 `cast` ...) r1_X95b) `cast` ...) s_X8Wq
           of _ { (# ipv_X8SU, ipv1_X8SW #) ->
           ((((((k_a90s ipv1_X8SW) `cast` ...) r_X93X) `cast` ...) r1_X95b)
            `cast` ...)
             ipv_X8SU
           })
        `cast` ...

With associated case matches in `main`

I suppose it's posssible that this is intended, although the code does
seem quite bloated for such a simple program. Full Core here[1].

Cheers,

- Ben


[1] http://mw0.mooo.com/~ben/Main.core
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140816/a32aa64b/attachment.sig>


More information about the Haskell-Cafe mailing list