aboutsummaryrefslogtreecommitdiff
path: root/haddock-library
diff options
context:
space:
mode:
Diffstat (limited to 'haddock-library')
-rw-r--r--haddock-library/haddock-library.cabal2
-rw-r--r--haddock-library/src/Documentation/Haddock/Parser/Identifier.hs10
2 files changed, 6 insertions, 6 deletions
diff --git a/haddock-library/haddock-library.cabal b/haddock-library/haddock-library.cabal
index 5c744082..99773475 100644
--- a/haddock-library/haddock-library.cabal
+++ b/haddock-library/haddock-library.cabal
@@ -33,7 +33,7 @@ common lib-defaults
ghc-options: -funbox-strict-fields -Wall -fwarn-tabs
if impl(ghc >= 8.0)
- ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances
+ ghc-options: -Wcompat -Wnoncanonical-monad-instances
library
import: lib-defaults
diff --git a/haddock-library/src/Documentation/Haddock/Parser/Identifier.hs b/haddock-library/src/Documentation/Haddock/Parser/Identifier.hs
index 7bc98b62..a83e5abf 100644
--- a/haddock-library/src/Documentation/Haddock/Parser/Identifier.hs
+++ b/haddock-library/src/Documentation/Haddock/Parser/Identifier.hs
@@ -109,7 +109,7 @@ takeIdentifier input = listToMaybe $ do
(cl, input'''') <- maybeToList (T.uncons input''')
guard (cl == '\'' || cl == '`')
- pure (ns, op, ident, cl, input'''')
+ return (ns, op, ident, cl, input'''')
where
@@ -122,21 +122,21 @@ takeIdentifier input = listToMaybe $ do
, c' == ',' || c' == ')'
-> do let (commas, t'') = T.span (== ',') t'
(')', t''') <- maybeToList (T.uncons t'')
- pure (T.take (T.length commas + 2) t, t''')
+ return (T.take (T.length commas + 2) t, t''')
-- Parenthesized
'(' -> do (n, t'' ) <- general False 0 [] t'
(')', t''') <- maybeToList (T.uncons t'')
- pure (T.take (n + 2) t, t''')
+ return (T.take (n + 2) t, t''')
-- Backticked
'`' -> do (n, t'' ) <- general False 0 [] t'
('`', t''') <- maybeToList (T.uncons t'')
- pure (T.take (n + 2) t, t''')
+ return (T.take (n + 2) t, t''')
-- Unadorned
_ -> do (n, t'' ) <- general False 0 [] t
- pure (T.take n t, t'')
+ return (T.take n t, t'')
-- | Parse out a possibly qualified operator or identifier
general :: Bool -- ^ refuse inputs starting with operators