Skip to content

initTc: unsolved constraints

Prelude> lucky (7.0 :: Num)
ghc.exe: panic! (the 'impossible' happened)
  (GHC version 8.0.2 for x86_64-unknown-mingw32):
        initTc: unsolved constraints
  WC {wc_insol =
        [W] lucky_afgR :: t_afgQ[tau:1] (CHoleCan: lucky)
        [W] lucky_afhl :: t_afhk[tau:1] (CHoleCan: lucky)}

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
lucky :: Num -> String
lucky 7 = "LUCKY NUMBER SEVEN!"
lucky x = "Sorry, you're out of luck, pal!"

I believe that the function declaration and invocation above don't actually make sense, but they caused a panic that asked for a bug report so I'm doing it. Apologies for my newness :)

Edited by junkbondtrader
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information