ghc crash from kinds
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
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | lowest |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |