summaryrefslogtreecommitdiff
path: root/libraries/template-haskell
diff options
context:
space:
mode:
authorAustin Seipp <austin@well-typed.com>2014-04-22 06:09:40 -0500
committerAustin Seipp <austin@well-typed.com>2014-09-09 08:13:27 -0500
commitd94de87252d0fe2ae97341d186b03a2fbe136b04 (patch)
tree1cac19f2786b1d8a1626886cd6373946a3a276b0 /libraries/template-haskell
parentfdfe6c0e50001add357475a1a3a7627243a28a70 (diff)
downloadhaskell-d94de87252d0fe2ae97341d186b03a2fbe136b04.tar.gz
Make Applicative a superclass of Monad
Summary: This includes pretty much all the changes needed to make `Applicative` a superclass of `Monad` finally. There's mostly reshuffling in the interests of avoid orphans and boot files, but luckily we can resolve all of them, pretty much. The only catch was that Alternative/MonadPlus also had to go into Prelude to avoid this. As a result, we must update the hsc2hs and haddock submodules. Signed-off-by: Austin Seipp <austin@well-typed.com> Test Plan: Build things, they might not explode horribly. Reviewers: hvr, simonmar Subscribers: simonmar Differential Revision: https://phabricator.haskell.org/D13
Diffstat (limited to 'libraries/template-haskell')
-rw-r--r--libraries/template-haskell/Language/Haskell/TH/PprLib.hs1
-rw-r--r--libraries/template-haskell/Language/Haskell/TH/Syntax.hs4
2 files changed, 3 insertions, 2 deletions
diff --git a/libraries/template-haskell/Language/Haskell/TH/PprLib.hs b/libraries/template-haskell/Language/Haskell/TH/PprLib.hs
index c4b0b77430..22b336ae81 100644
--- a/libraries/template-haskell/Language/Haskell/TH/PprLib.hs
+++ b/libraries/template-haskell/Language/Haskell/TH/PprLib.hs
@@ -38,7 +38,6 @@ module Language.Haskell.TH.PprLib (
import Language.Haskell.TH.Syntax
(Name(..), showName', NameFlavour(..), NameIs(..))
import qualified Text.PrettyPrint as HPJ
-import Control.Applicative (Applicative(..))
import Control.Monad (liftM, liftM2, ap)
import Language.Haskell.TH.Lib.Map ( Map )
import qualified Language.Haskell.TH.Lib.Map as Map ( lookup, insert, empty )
diff --git a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
index 3172cbbced..650410841e 100644
--- a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
+++ b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE DeriveDataTypeable, MagicHash, PolymorphicComponents, RoleAnnotations, UnboxedTuples #-}
+{-# LANGUAGE CPP, DeriveDataTypeable, MagicHash, PolymorphicComponents, RoleAnnotations, UnboxedTuples #-}
-----------------------------------------------------------------------------
-- |
@@ -19,7 +19,9 @@ module Language.Haskell.TH.Syntax where
import GHC.Exts
import Data.Data (Data(..), Typeable, mkConstr, mkDataType, constrIndex)
import qualified Data.Data as Data
+#if __GLASGOW_HASKELL__ < 709
import Control.Applicative( Applicative(..) )
+#endif
import Data.IORef
import System.IO.Unsafe ( unsafePerformIO )
import Control.Monad (liftM)