aboutsummaryrefslogtreecommitdiff
path: root/haddock-library/src/Documentation/Haddock/Parser/Monad.hs
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2019-12-08 11:53:39 +0100
committerHerbert Valerio Riedel <hvr@gnu.org>2019-12-08 12:09:54 +0100
commitbe8b02c4e3cffe7d45b3dad0a0f071d35a274d65 (patch)
tree09e553a3714807eaf493fddb300c425b2f0d4b21 /haddock-library/src/Documentation/Haddock/Parser/Monad.hs
parentee05ff1ecde866e31f72e3fa4f773dca98944dc3 (diff)
Fix build-failure regression for base < 4.7
The `$>` operator definition is available only since base-4.7 which unfortunately wasn't caught before release to Hackage (but has been fixed up by a metadata-revision) This commit introduces a `CompatPrelude` module which allows to reduce the amount of CPP by ousting it to a central location, i.e. the new `CompatPrelude` module. This pattern also tends to reduce the tricks needed to silence unused import warnings. Addresses #1119
Diffstat (limited to 'haddock-library/src/Documentation/Haddock/Parser/Monad.hs')
-rw-r--r--haddock-library/src/Documentation/Haddock/Parser/Monad.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/haddock-library/src/Documentation/Haddock/Parser/Monad.hs b/haddock-library/src/Documentation/Haddock/Parser/Monad.hs
index fa46f536..7c73a168 100644
--- a/haddock-library/src/Documentation/Haddock/Parser/Monad.hs
+++ b/haddock-library/src/Documentation/Haddock/Parser/Monad.hs
@@ -29,7 +29,6 @@ import qualified Data.Text as T
import Data.Text ( Text )
import Control.Monad ( mfilter )
-import Data.Functor ( ($>) )
import Data.String ( IsString(..) )
import Data.Bits ( Bits(..) )
import Data.Char ( ord )
@@ -37,7 +36,9 @@ import Data.List ( foldl' )
import Control.Applicative as App
import Documentation.Haddock.Types ( Version )
+
import Prelude hiding (takeWhile)
+import CompatPrelude
-- | The only bit of information we really care about truding along with us
-- through parsing is the version attached to a @\@since@ annotation - if