I'm trying to install an application Termite - Util but I get this error in with the line 14
newtype CE m a = CE {unCE :: m a} deriving (Monad)
The error says:
ContextError.hs:14:45: No instance for (Applicative (CE m)) arising from the 'deriving' clause of a data type declaration Possible fix: use a standalone 'deriving instance' declaration, so you can specify the instance context yourself When deriving the instance for (Monad (CE m))
I have alredy try with the solution proposed in CIS 194: Homework 7
adding this:
instance Applicative (CE m) where pure = return (<*>) = ap
but I get this error again
ContextError.hs:14:45: No instance for (Functor (CE m)) arising from the 'deriving' clause of a data type declaration Possible fix: use a standalone 'deriving instance' declaration, so you can specify the instance context yourself When deriving the instance for (Monad (CE m))
I really don't know how to proceed, I'm new with Haskell
Thanks in advance.
Monad
requires the type to beApplicative
. – Willem Van Onsemderiving (Functor, Applicative, Monad)
together. It wasn't required a few years ago, but it is now. – chideriving (Functor, Applicative, Monad)
– Agustin Larreinegabe