summaryrefslogtreecommitdiff
path: root/libraries/template-haskell
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2017-08-01 09:48:52 -0400
committerBen Gamari <ben@smart-cactus.org>2017-08-01 10:37:34 -0400
commitc13720c8c6047844f659ad4ce684946b80c99bee (patch)
tree9c6462bf94d69daa318e5a4a9e2d84981743e1ec /libraries/template-haskell
parentb311096c5cf4b669dcfceb99561ac6e1c4cca0cd (diff)
downloadhaskell-c13720c8c6047844f659ad4ce684946b80c99bee.tar.gz
Drop GHC 7.10 compatibility
GHC 8.2.1 is out, so now GHC's support window only extends back to GHC 8.0. This means we can delete gobs of code that was only used for GHC 7.10 support. Hooray! Test Plan: ./validate Reviewers: hvr, bgamari, austin, goldfire, simonmar Reviewed By: bgamari Subscribers: Phyx, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3781
Diffstat (limited to 'libraries/template-haskell')
-rw-r--r--libraries/template-haskell/Language/Haskell/TH/Syntax.hs16
1 files changed, 1 insertions, 15 deletions
diff --git a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
index 14aeaeb380..90c728296b 100644
--- a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
+++ b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
@@ -1,14 +1,10 @@
-{-# LANGUAGE CPP, DeriveDataTypeable,
+{-# LANGUAGE DeriveDataTypeable,
DeriveGeneric, FlexibleInstances, DefaultSignatures,
RankNTypes, RoleAnnotations, ScopedTypeVariables,
Trustworthy #-}
{-# OPTIONS_GHC -fno-warn-inline-rule-shadowing #-}
-#if MIN_VERSION_base(4,9,0)
-# define HAS_MONADFAIL 1
-#endif
-
-----------------------------------------------------------------------------
-- |
-- Module : Language.Haskell.Syntax
@@ -45,9 +41,7 @@ import GHC.ForeignSrcLang.Type
import Language.Haskell.TH.LanguageExtensions
import Numeric.Natural
-#if HAS_MONADFAIL
import qualified Control.Monad.Fail as Fail
-#endif
-----------------------------------------------------
--
@@ -55,11 +49,7 @@ import qualified Control.Monad.Fail as Fail
--
-----------------------------------------------------
-#if HAS_MONADFAIL
class Fail.MonadFail m => Quasi m where
-#else
-class Monad m => Quasi m where
-#endif
qNewName :: String -> m Name
-- ^ Fresh names
@@ -179,14 +169,10 @@ runQ (Q m) = m
instance Monad Q where
Q m >>= k = Q (m >>= \x -> unQ (k x))
(>>) = (*>)
-#if !HAS_MONADFAIL
- fail s = report True s >> Q (fail "Q monad failure")
-#else
fail = Fail.fail
instance Fail.MonadFail Q where
fail s = report True s >> Q (Fail.fail "Q monad failure")
-#endif
instance Functor Q where
fmap f (Q x) = Q (fmap f x)