Skip to content

Instantly share code, notes, and snippets.

@thoughtpolice
Created May 12, 2014 12:24
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save thoughtpolice/6df4c70d8a8fb711b282 to your computer and use it in GitHub Desktop.
libraries/haskeline/System/Console/Haskeline/Backend/DumbTerm.hs:25:49:
Could not coerce from ‘StateT
Window (PosixT m) (StateT Window (PosixT m) a)’
to ‘StateT Window (PosixT m) (DumbTerm m a)’
because the third type argument of ‘StateT’ has role Nominal,
but the arguments ‘StateT Window (PosixT m) a’ and ‘DumbTerm m a’
differ
arising from the coercion of the method ‘GHC.Base.join’
from type ‘forall a.
StateT Window (PosixT m) (StateT Window (PosixT m) a)
-> StateT Window (PosixT m) a’
to type ‘forall a. DumbTerm m (DumbTerm m a) -> DumbTerm m a’
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
When deriving the instance for (Monad (DumbTerm m))
make[1]: *** [libraries/haskeline/dist-install/build/System/Console/Haskeline/Backend/DumbTerm.o] Error 1
make[1]: *** Waiting for unfinished jobs....
libraries/haskeline/System/Console/Haskeline/Backend/Terminfo.hs:107:37:
Could not coerce from ‘ReaderT
Actions
(ReaderT Terminal (StateT TermRows (StateT TermPos (PosixT m))))
(ReaderT
Actions
(ReaderT Terminal (StateT TermRows (StateT TermPos (PosixT m))))
a)’
to ‘ReaderT
Actions
(ReaderT Terminal (StateT TermRows (StateT TermPos (PosixT m))))
(Draw m a)’
because the third type argument of ‘ReaderT’ has role Nominal,
but the arguments
‘ReaderT
Actions
(ReaderT Terminal (StateT TermRows (StateT TermPos (PosixT m))))
a’
and ‘Draw m a’ differ
arising from the coercion of the method ‘join’
from type ‘forall a.
ReaderT
Actions
(ReaderT Terminal (StateT TermRows (StateT TermPos (PosixT m))))
(ReaderT
Actions
(ReaderT Terminal (StateT TermRows (StateT TermPos (PosixT m))))
a)
-> ReaderT
Actions
(ReaderT Terminal (StateT TermRows (StateT TermPos (PosixT m))))
a’
to type ‘forall a. Draw m (Draw m a) -> Draw m a’
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
When deriving the instance for (Monad (Draw m))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment