Given the following program:
{-
MonadReader output MonadReader must be MonadReader Int . GHC displays the following error message:
Expecting one more argument to 'MonadReader' Expected kind '* -> ghc-prim-0.4.0.0:GHC.Prim.Constraint', but 'MonadReader' has kind '* -> (* -> *) -> ghc-prim-0.4.0.0:GHC.Prim.Constraint' In the newtype declaration for 'AppM'
This error message is confusing to me. The MonadReader type is * -> (* -> *) -> GHC.Prim.Constraint , as the error message says, which makes sense. However, the error message states that it expects kind * -> GHC.Prim.Constraint , despite the fact that MonadReader Int does look like (* -> *) -> GHC.Prim.Constraint .
Given that the types * and * -> * do not match, this error message not only misleads me, but is actually incorrect. Is this an error, or am I missing something in this error message?
haskell ghc
Alexis king
source share