[GHC] #8461: Panic (on woefully incorrect code)
GHC
ghc-devs at haskell.org
Sat Oct 19 17:18:35 UTC 2013
#8461: Panic (on woefully incorrect code)
-----------------------------------+---------------------------------------
Reporter: srhb | Owner:
Type: bug | Status: new
Priority: low | Milestone:
Component: Compiler | Version: 7.6.3
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: Compile-time crash
Unknown/Multiple | Test Case:
Difficulty: Unknown | Blocking:
Blocked By: |
Related Tickets: |
-----------------------------------+---------------------------------------
The following (very wrong) code causes a panic. The haskeline hackage
package is required.
{{{
import System.Console.Haskeline
import Control.Monad.State.Strict
main = runStateT (runInputT settings loop) 0
where
loop = do
minput <- lift getInputLine "% "
loop
settings :: Settings (StateT Int IO)
settings = setComplete comp defaultSettings
comp _ = do
n <- get
put (n+1)
return ("", [Completion (show n) "" True])
}}}
The error:
{{{
[1 of 1] Compiling Main ( test.hs, test.o )
test.hs:7:20:
Couldn't match kind `* -> *' with `*'
Expected type: [Char] -> InputT m0 (Maybe String)
Actual type: [Char] -> InputT m0 (Maybe String)
Kind incompatibility when matching types:
[Char] :: * -> *
[Char] :: *
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
}}}
PS: It was not clear to me whether to call this a compile-time crash or
not. All I know is that the 'impossible' happened. :)
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8461>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list