[GHC] #8531: ghc crash from kinds
GHC
ghc-devs at haskell.org
Thu Nov 14 05:30:39 UTC 2013
#8531: ghc crash from kinds
-----------------------------------+---------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: lowest | Milestone:
Component: Compiler | Version: 7.6.3
Keywords: | Operating System: MacOS X
Architecture: | Type of failure: Compile-time crash
Unknown/Multiple | Test Case:
Difficulty: Unknown | Blocking:
Blocked By: |
Related Tickets: |
-----------------------------------+---------------------------------------
When I run this in ghci:
{{{
let x :: MaybeT IO (Ptr Int); x = (lift newCString "hi") >>=
nullableToMaybeT
}}}
I get this output:
{{{
Couldn't match kind `* -> *' with `*'
Expected type: [Char] -> MaybeT IO (Ptr Int)
Actual type: [Char] -> MaybeT IO (Ptr Int)
Kind incompatibility when matching types:
[Char] :: * -> *
[Char] :: *
The function `lift'ghc: panic! (the 'impossible' happened)
(GHC version 7.6.3 for x86_64-apple-darwin):
kindFunResult
<<details unavailable>>
}}}
where nullToMaybeT is:
{{{
nullableToMaybeT :: Monad m => Ptr a -> MaybeT m (Ptr a)
nullableToMaybeT ptr = do
case (ptr == nullPtr) of
True -> (MaybeT . return) Nothing
False -> return ptr
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8531>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list