Skip to content

ghc: panic! (the 'impossible' happened)

Apparently not so impossible. I am just filling a bug following the advice of GHC.

Here's the error message coming out of GHC

ghc: panic! (the 'impossible' happened)
  (GHC version 8.0.2 for x86_64-unknown-linux):
	initTc: unsolved constraints
  WC {wc_insol =
        [W] liftIO_a2jc :: t_a2jb[tau:1] (CHoleCan: liftIO)
        [W] handleMsg_a2k6 :: t_a2k5[tau:1] (CHoleCan: handleMsg)
        [W] expectTimeout_a2kb :: t_a2ka[tau:1] (CHoleCan: expectTimeout)
        [W] sendMsg_a2v9 :: t_a2v8[tau:1] (CHoleCan: sendMsg)
        [W] tick_a2vc :: t_a2vb[tau:1] (CHoleCan: tick)}

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

And here the corresponding code that leads to this compilation error:

module Main where

import           Control.Distributed.Process (NodeId (..), Process)
import           Control.Monad               (forever)
import           Data.IORef                  (IORef, newIORef)


type Clock =
  Int

emitRandomNumbers :: [NodeId] -> Process ()
emitRandomNumbers nodes = do
  clock <-
    liftIO $ newIORef (0 :: Clock)

  forever $ do
    msg <-
      handleMsg <$> expectTimeout 0

    sendMsg <$> tick

I am compiling on with GHC 8.0.2 on Ubuntu 16.04, here are a list of the install dependencies:

array 0.5.1.1
base 4.9.1.0
binary 0.8.3.0
bytestring 0.10.8.1
containers 0.5.7.1
data-accessor 0.2.2.7
deepseq 1.4.2.0
distributed-process 0.7.3
distributed-static 0.3.8
exceptions 0.8.3
getting-started 0.1.0.0
ghc-boot-th 8.0.2
ghc-prim 0.5.0.0
hashable 1.2.6.1
integer-gmp 1.0.0.1
mtl 2.2.1
network 2.6.3.2
network-transport 0.4.4.0
network-transport-tcp 0.5.1
pretty 1.1.3.3
random 1.1
rank1dynamic 0.3.3.0
rts 1.0
stm 2.4.4.1
syb 0.7
template-haskell 2.11.1.0
text 1.2.2.2
time 1.6.0.1
transformers 0.5.2.0
transformers-compat 0.5.1.4
unix 2.7.2.1

Let me know should you need any additional informations.

Trac metadata
Trac field Value
Version 8.0.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information