summaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2015-05-11 15:48:35 -0700
committerEdward Z. Yang <ezyang@cs.stanford.edu>2015-05-11 21:35:42 -0700
commitef7ed16c8a34e5ab26a23264f02aa6391c338884 (patch)
tree39e0a085980f3966224d8f2baf70d6f13559f0c9 /libraries
parent4fffbc34c024231c3c9fac7a2134896cc09c7fb7 (diff)
downloadhaskell-ef7ed16c8a34e5ab26a23264f02aa6391c338884.tar.gz
Make template-haskell build with GHC 7.6, fixes bootstrap build.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate on 7.6 Reviewers: austin, goldfire Subscribers: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D885
Diffstat (limited to 'libraries')
-rw-r--r--libraries/template-haskell/Language/Haskell/TH/Syntax.hs11
-rw-r--r--libraries/template-haskell/template-haskell.cabal3
2 files changed, 11 insertions, 3 deletions
diff --git a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
index 8879c62d19..a6f970d125 100644
--- a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
+++ b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
@@ -1,5 +1,12 @@
{-# LANGUAGE CPP, DeriveDataTypeable, PolymorphicComponents,
- RoleAnnotations, DeriveGeneric, FlexibleInstances #-}
+ DeriveGeneric, FlexibleInstances #-}
+
+#if __GLASGOW_HASKELL__ >= 707
+{-# LANGUAGE RoleAnnotations #-}
+{-# OPTIONS_GHC -fno-warn-inline-rule-shadowing #-}
+#else
+{-# OPTIONS_GHC -w #-} -- -fno-warn-inline-rule-shadowing doesn't exist
+#endif
#if MIN_VERSION_base(4,8,0)
#define HAS_NATURAL
@@ -170,7 +177,9 @@ instance Applicative Q where
--
-----------------------------------------------------
+#if __GLASGOW_HASKELL__ >= 707
type role TExp nominal -- See Note [Role of TExp]
+#endif
newtype TExp a = TExp { unType :: Exp }
unTypeQ :: Q (TExp a) -> Q Exp
diff --git a/libraries/template-haskell/template-haskell.cabal b/libraries/template-haskell/template-haskell.cabal
index bd277d127c..de71132814 100644
--- a/libraries/template-haskell/template-haskell.cabal
+++ b/libraries/template-haskell/template-haskell.cabal
@@ -31,7 +31,6 @@ Library
MagicHash
PolymorphicComponents
RankNTypes
- RoleAnnotations
ScopedTypeVariables
TemplateHaskell
UnboxedTuples
@@ -48,7 +47,7 @@ Library
Language.Haskell.TH.Lib.Map
build-depends:
- base >= 4.7 && < 4.9,
+ base >= 4.6 && < 4.9,
pretty == 1.1.*
-- We need to set the package key to template-haskell (without a