the 'impossible' happened, initTc: unsolved constraints
Compile simple program using stack: stack ghc Main.hs
code:
import Control.Monad.Writer.Strict
logNumber :: Int -> Writer [String] Int
logNumber x = Writer (x, ["Got number: " ++ show x])
multWithLog :: Writer [String] Int
multWithLog = do
a <- logNumber 3
b <- logNumber 5
tell ["Gonnay multiply these two"]
return (a*b)
[1 of 1] Compiling Main ( Main.hs, Main.o )
ghc: panic! (the 'impossible' happened)
(GHC version 8.0.2 for x86_64-unknown-linux):
initTc: unsolved constraints
WC {wc_insol = [W] Writer_a19y :: t_a19x[tau:1] (CHoleCan: Writer)}
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug