[GHC] #7802: kindFunResult in monad transformer
GHC
cvs-ghc at haskell.org
Sun Mar 31 22:51:25 CEST 2013
#7802: kindFunResult in monad transformer
-------------------------------+--------------------------------------------
Reporter: tobsan | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler (Type checker)
Version: 7.6.1 | Keywords:
Os: Linux | Architecture: x86_64 (amd64)
Failure: Compile-time crash | Blockedby:
Blocking: | Related:
-------------------------------+--------------------------------------------
This is probably related to the existing (fixed?) bug(s) about
kindFunResult, but better safe than sorry.
I was writing a brainfuck interpreter, and tried changing this code:
{{{
getptrval = gets mem >>= \a -> gets ptr >>= lift . readArray a
}}}
to this (which probably wouldn't even work):
{{{
getptrval = liftM2 (lift . readArray) (gets ptr) (gets mem)
}}}
which gives this error message from GHC:
{{{
Brainfuck.hs:53:21:ghc: panic! (the 'impossible' happened)
(GHC version 7.6.1 for x86_64-unknown-linux):
kindFunResult
<<details unavailable>>
}}}
Related type information:
{{{
type BFMonad a = StateT BFState IO a
data BFState = BF {
pc, ptr :: Int,
mem :: IOUArray Int Int,
program :: UArray Int Char
}
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7802>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list