title: Newtype Deriving Monad Error
body: <p>I'm trying to install an application <a href="https://raw.githubusercontent.com/termite2/util/master/ContextError.hs" rel="nofollow noreferrer">Termite - Util</a> but I get this error in with the line 14</p>
  
  <pre><code>newtype CE m a = CE {unCE :: m a} deriving (Monad)
  </code></pre>
  
  <p>The error says:</p>
  
  <blockquote>
    <p>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))</p>
  </blockquote>
  
  <p>I have alredy try with the solution proposed in <a href="https://www.reddit.com/r/haskellquestions/comments/3j55zb/cis_194_homework_7/?st=j459vj72&amp;sh=497043ff" rel="nofollow noreferrer">CIS 194: Homework 7</a></p>
  
  <p>adding this:</p>
  
  <blockquote>
    <p>instance Applicative (CE m) where
       pure = return
       (&lt;*>) = ap</p>
  </blockquote>
  
  <p>but I get this error again</p>
  
  <blockquote>
    <p>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))</p>
  </blockquote>
  
  <p>I really don't know how to proceed, I'm new with Haskell</p>
  
  <p>Thanks in advance.</p>