aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface
diff options
context:
space:
mode:
Diffstat (limited to 'src/Haddock/Interface')
-rw-r--r--src/Haddock/Interface/Rename.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Haddock/Interface/Rename.hs b/src/Haddock/Interface/Rename.hs
index 7f322eca..b703da0f 100644
--- a/src/Haddock/Interface/Rename.hs
+++ b/src/Haddock/Interface/Rename.hs
@@ -97,6 +97,10 @@ instance Monad (GenRnM n) where
instance Functor (GenRnM n) where
fmap f x = do a <- x; return (f a)
+instance Applicative (GenRnM n) where
+ pure = return
+ (<*>) = ap
+
returnRn :: a -> GenRnM n a
returnRn a = RnM (const (a,[]))
thenRn :: GenRnM n a -> (a -> GenRnM n b) -> GenRnM n b
@@ -144,12 +148,12 @@ renameExportItems = mapM renameExportItem
renameDocForDecl :: DocForDecl Name -> RnM (DocForDecl DocName)
renameDocForDecl (doc, fnArgsDoc) =
- (,) `fmap` renameDocumentation doc `ap` renameFnArgsDoc fnArgsDoc
+ (,) <$> renameDocumentation doc <*> renameFnArgsDoc fnArgsDoc
renameDocumentation :: Documentation Name -> RnM (Documentation DocName)
renameDocumentation (Documentation mDoc mWarning) =
- Documentation `fmap` mapM renameDoc mDoc `ap` mapM renameDoc mWarning
+ Documentation <$> mapM renameDoc mDoc <*> mapM renameDoc mWarning
renameLDocHsSyn :: LHsDocString -> RnM LHsDocString