Make Control.Applicative imports conditional
authorGreg Hurrell <greg@hurrell.net>
Tue, 21 Jun 2016 15:20:22 +0000 (08:20 -0700)
committerGreg Hurrell <greg@hurrell.net>
Tue, 21 Jun 2016 15:20:22 +0000 (08:20 -0700)
May eventually want to go with a Prelude wrapper like this:

https://github.com/jgm/pandoc/blob/09b4f294bf4584f00/prelude/Prelude.hs

But starting simply for now.

lib/Text/Docvim/Printer/Markdown.hs
lib/Text/Docvim/Printer/Vim.hs
tests/Tasty.hs

index 832d99fa517edb9b66c24cefcd7fe31450b6561d..142e0cfa1c0c5cb09da73fa7db55f4f7b468a79c 100644 (file)
@@ -1,6 +1,10 @@
+{-# LANGUAGE CPP #-}
+
 module Text.Docvim.Printer.Markdown (markdown) where
 
+#if !MIN_VERSION_base(4,8,0)
 import Control.Applicative ((<$>))
+#endif
 import Control.Monad.Reader
 import Data.List
 import Data.Maybe
index 9eaac54935b123b83d25a45aba9cc4e0a6c7fd47..18e649ac9d11ad1c89579a5b18b886ca0740a583 100644 (file)
@@ -1,8 +1,11 @@
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE MultiWayIf #-}
 
 module Text.Docvim.Printer.Vim (vimHelp) where
 
+#if !MIN_VERSION_base(4,8,0)
 import Control.Applicative ((<$>))
+#endif
 import Control.Arrow
 import Control.Monad
 import Control.Monad.Reader
index fde885309ff63270864b8e3b43b955d7fc3d3b5f..fea1682da1053df7a713eb572e6535bcc9785c8c 100644 (file)
@@ -1,8 +1,11 @@
+{-# LANGUAGE CPP #-}
 {-# OPTIONS_GHC -fno-warn-type-defaults #-}
 
 module Main (main) where
 
+#if !MIN_VERSION_base(4,8,0)
 import Control.Applicative ((<$>))
+#endif
 import Control.DeepSeq
 import Control.Exception hiding (assert)
 import Data.ByteString.Lazy.Char8 (pack, unpack)