From e72cc68ad7be37948621ec3006f29d9d2e0cc365 Mon Sep 17 00:00:00 2001
From: David Luposchainsky <dluposchainsky@gmail.com>
Date: Fri, 6 Sep 2013 19:47:22 +0200
Subject: Fix AMP warnings

Signed-off-by: Austin Seipp <aseipp@pobox.com>
---
 src/Haddock/Types.hs | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/Haddock/Types.hs b/src/Haddock/Types.hs
index bd4f10fa..19a6c90b 100644
--- a/src/Haddock/Types.hs
+++ b/src/Haddock/Types.hs
@@ -30,6 +30,8 @@ import qualified Data.Map as Map
 import Data.Monoid
 import GHC hiding (NoLink)
 import OccName
+import Control.Applicative (Applicative(..))
+import Control.Monad (ap)
 
 
 -----------------------------------------------------------------------------
@@ -493,6 +495,9 @@ newtype ErrMsgM a = Writer { runWriter :: (a, [ErrMsg]) }
 instance Functor ErrMsgM where
         fmap f (Writer (a, msgs)) = Writer (f a, msgs)
 
+instance Applicative ErrMsgM where
+    pure = return
+    (<*>) = ap
 
 instance Monad ErrMsgM where
         return a = Writer (a, [])
@@ -543,6 +548,9 @@ liftErrMsg = WriterGhc . return . runWriter
 instance Functor ErrMsgGhc where
   fmap f (WriterGhc x) = WriterGhc (fmap (first f) x)
 
+instance Applicative ErrMsgGhc where
+    pure = return
+    (<*>) = ap
 
 instance Monad ErrMsgGhc where
   return a = WriterGhc (return (a, []))
-- 
cgit v1.2.3