[GHC] #9139: Using lift with StateT and Maybe on GHCI

#9139: Using lift with StateT and Maybe on GHCI ------------------------------------+---------------------------- Reporter: Jefffrey | Owner: Type: bug | Status: new Priority: low | Milestone: Component: GHCi | Version: 7.6.3 Keywords: | Operating System: MacOS X Architecture: Unknown/Multiple | Type of failure: Other Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+---------------------------- I was playing around with `StateT` and `Maybe` today and I run the following two commands (consider that `TC` == `import qualified Control.Monad.Trans.Class as TC`: {{{ ghci> let g = TC.lift Just [3, 4] :: StateT [Int] Maybe Int }}} which led to a: {{{ <interactive>:54:9: Couldn't match kind `* -> *' with `*' Expected type: [t0] -> StateT [Int] Maybe Int Actual type: [t0] -> StateT [Int] Maybe Int Kind incompatibility when matching types: [t_i] :: * -> * [t0] :: * The function `TC.lift'ghc: panic! (the 'impossible' happened) (GHC version 7.6.3 for x86_64-apple-darwin): kindFunResult <<details unavailable>> Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} and {{{
let g = TC.lift Just (1, [3, 4]) :: StateT [Int] Maybe Int }}}
which led to: {{{ <interactive>:55:9: Couldn't match kind `* -> *' with `*' Expected type: (t0, [t1]) -> StateT [Int] Maybe Int Actual type: (t0, [t1]) -> StateT [Int] Maybe Int Kind incompatibility when matching types: (t_i, [t_l]) :: * -> * (t0, [t1]) :: * The function `TC.lift'ghc: panic! (the 'impossible' happened) (GHC version 7.6.3 for x86_64-apple-darwin): kindFunResult <<details unavailable>> Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} I'm just doing what the last line asked me. :) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9139 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9139: Using lift with StateT and Maybe on GHCI ------------------------------+------------------------------------ Reporter: Jefffrey | Owner: Type: bug | Status: closed Priority: low | Milestone: Component: GHCi | Version: 7.6.3 Resolution: duplicate | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: Other | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ------------------------------+------------------------------------ Changes (by simonpj): * status: new => closed * resolution: => duplicate Comment: I suspect this is #7368. Anyway it works fine in 7.8 I think. Do reopen if I'm wrong. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9139#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC