Skip to content

Instantly share code, notes, and snippets.

@kokjo
Created December 21, 2016 15:11
Show Gist options
  • Save kokjo/b3e5ec4a0318462d4e012d98f2bd379e to your computer and use it in GitHub Desktop.
Save kokjo/b3e5ec4a0318462d4e012d98f2bd379e to your computer and use it in GitHub Desktop.
module Bug where
import Control.Monad
import Control.Monad.State (gets)
import Control.Monad.Trans.Class (lift)
foo = lift lift gets
{-
$ ghc bug.hs
[1 of 1] Compiling Bug ( bug.hs, bug.o )
bug.hs:7:7:
Couldn't match kind `* -> *' with `*'
Expected type: ((s0 -> a1) -> m1 a1) -> t0 m0 a0
Actual type: ((s0 -> a1) -> m1 a1) -> t0 m0 a0
Kind incompatibility when matching types:
(s_j -> a_k) -> m_l a_k :: * -> *
(s0 -> a1) -> m1 a1 :: *
The function `lift'ghc: panic! (the 'impossible' happened)
(GHC version 7.6.3 for x86_64-unknown-linux):
kindFunResult ghc-prim:GHC.Prim.*{(w) tc 34d}
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
-}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment