Commit 5128b784 authored by Ryan Scott's avatar Ryan Scott

Drop, migrate old patches

* The patches for `barbies`, `ghc-tcplugins-extra`, `ghc-typelits-extra`,
  `mono-traversable`, and `persistent-sqlite` have all been dropped as
  their latest Hackage versions support GHC 8.8 through HEAD.
* The `pandoc-2.9.1` patch has been migrated to support the latest
  Hackage version, 2.9.1.1.
parent b7941dd5
Pipeline #14884 failed with stages
in 206 minutes and 44 seconds
diff --git a/src/Data/Barbie/Internal/Constraints.hs b/src/Data/Barbie/Internal/Constraints.hs
index d1da2f2..7087ed2 100644
--- a/src/Data/Barbie/Internal/Constraints.hs
+++ b/src/Data/Barbie/Internal/Constraints.hs
@@ -179,7 +179,7 @@ gbaddDictsDefault
class GAllBC (repbf :: * -> *) where
type GAllB (c :: k -> Constraint) repbf :: Constraint
-class GAllBC repbx => GConstraintsB c (f :: k -> *) repbx repbf repbdf where
+class GAllBC repbx => GConstraintsB c f repbx repbf repbdf where
gbaddDicts :: GAllB c repbx => repbf x -> repbdf x
diff --git a/src/Data/Barbie/Internal/Product.hs b/src/Data/Barbie/Internal/Product.hs
index 31abc4b..6fef250 100644
--- a/src/Data/Barbie/Internal/Product.hs
+++ b/src/Data/Barbie/Internal/Product.hs
@@ -168,7 +168,7 @@ gbuniqDefault x
= toN (gbuniq @f @f @_ @(RepN (b f)) @(RepN (b (f `Product` f))) x)
{-# INLINE gbuniqDefault #-}
-class GProductB (f :: k -> *) (g :: k -> *) repbf repbg repbfg where
+class GProductB f g repbf repbg repbfg where
gbprod :: repbf x -> repbg x -> repbfg x
gbuniq :: (forall a . f a) -> repbf x
diff --git a/ghc-tcplugins-extra.cabal b/ghc-tcplugins-extra.cabal
index 95e7226..3838668 100644
--- a/ghc-tcplugins-extra.cabal
+++ b/ghc-tcplugins-extra.cabal
@@ -1,5 +1,6 @@
name: ghc-tcplugins-extra
version: 0.3
+x-revision: 2
synopsis: Utilities for writing GHC type-checker plugins
description: Utilities for writing GHC type-checker plugins, such as
creating constraints, with a stable API covering multiple
@@ -17,8 +18,8 @@ build-type: Simple
extra-source-files: README.md
CHANGELOG.md
cabal-version: >=1.10
-tested-with: GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.1,
- GHC == 8.4.2, GHC == 8.5
+tested-with: GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4,
+ GHC == 8.6.5, GHC == 8.8.1
source-repository head
type: git
@@ -33,7 +34,7 @@ flag deverror
library
exposed-modules: GHC.TcPluginM.Extra
build-depends: base >=4.8 && <5,
- ghc >=7.10 && <8.6
+ ghc >=7.10 && <8.9
hs-source-dirs: src
default-language: Haskell2010
other-extensions: CPP
diff --git a/src/GHC/TcPluginM/Extra.hs b/src/GHC/TcPluginM/Extra.hs
index 2f95012..8a8720e 100644
--- a/src/GHC/TcPluginM/Extra.hs
+++ b/src/GHC/TcPluginM/Extra.hs
@@ -75,9 +75,14 @@ import TcRnTypes (Ct, CtEvidence (..), CtLoc, TcIdBinder (..), TcLclEnv (..),
import TcPluginM (FindResult (..), TcPluginM, findImportedModule, lookupOrig,
tcPluginTrace)
import qualified TcPluginM
+#if __GLASGOW_HASKELL__ >= 809
+import Constraint (CtEvidence (..), CtLoc)
+import TcRnTypes (TcPlugin (..), TcPluginResult (..))
+#else
import TcRnTypes (CtEvidence (..), CtLoc,
TcPlugin (..), TcPluginResult (..))
#endif
+#endif
#if __GLASGOW_HASKELL__ < 802
import TcPluginM (tcPluginIO)
#endif
@@ -93,9 +98,17 @@ import Control.Arrow (first, second)
import Data.Function (on)
import Data.List (groupBy, partition, sortOn)
import Data.Maybe (mapMaybe)
+#if __GLASGOW_HASKELL__ >= 809
+import Constraint (Ct (..), ctLoc, ctEvId, mkNonCanonical)
+#else
import TcRnTypes (Ct (..), ctLoc, ctEvId, mkNonCanonical)
+#endif
import TcType (TcTyVar, TcType)
+#if __GLASGOW_HASKELL__ >= 809
+import Coercion (mkPrimEqPred)
+#else
import Type (mkPrimEqPred)
+#endif
import TyCoRep (Type (..))
#endif
@@ -371,8 +384,16 @@ substType _subst t@(ForAllTy _tv _ty) =
-- TODO: Is it safe to do "dumb" substitution under binders?
-- ForAllTy tv (substType subst ty)
t
-substType subst (FunTy t1 t2) =
- FunTy (substType subst t1) (substType subst t2)
+substType subst (FunTy
+#if __GLASGOW_HASKELL__ >= 809
+ af
+#endif
+ t1 t2) =
+ FunTy
+#if __GLASGOW_HASKELL__ >= 809
+ af
+#endif
+ (substType subst t1) (substType subst t2)
substType _ l@(LitTy _) = l
substType subst (CastTy ty co) =
CastTy (substType subst ty) co
diff --git a/src/GHC/TypeLits/Extra/Solver.hs b/src/GHC/TypeLits/Extra/Solver.hs
index 2a978ba..1d140ed 100644
--- a/src/GHC/TypeLits/Extra/Solver.hs
+++ b/src/GHC/TypeLits/Extra/Solver.hs
@@ -40,12 +40,19 @@ import Plugins (purePlugin)
#endif
import TcEvidence (EvTerm)
import TcPluginM (TcPluginM, tcLookupTyCon, tcPluginTrace)
-import TcRnTypes (Ct, TcPlugin(..), TcPluginResult (..), ctEvidence, ctEvPred,
- isWantedCt)
-import TcType (typeKind)
+import TcRnTypes (TcPlugin(..), TcPluginResult (..))
+
+#if MIN_VERSION_ghc(8,9,0)
+import Constraint (Ct, ctEvidence, ctEvPred, isWantedCt)
+import Predicate (EqRel (NomEq), Pred (EqPred), classifyPredType)
+import Type (Kind, eqType, typeKind)
+import TyCoRep (Type (..))
+#else
+import TcRnTypes (Ct, ctEvidence, ctEvPred, isWantedCt)
import Type (EqRel (NomEq), Kind, PredTree (EqPred), classifyPredType,
- eqType)
+ eqType, typeKind)
import TyCoRep (Type (..))
+#endif
import TysWiredIn (typeNatKind, promotedTrueDataCon, promotedFalseDataCon)
import TcTypeNats (typeNatLeqTyCon)
#if MIN_VERSION_ghc(8,4,0)
diff --git a/src/GHC/TypeLits/Extra/Solver/Unify.hs b/src/GHC/TypeLits/Extra/Solver/Unify.hs
index 0bd0159..89c6438 100644
--- a/src/GHC/TypeLits/Extra/Solver/Unify.hs
+++ b/src/GHC/TypeLits/Extra/Solver/Unify.hs
@@ -26,7 +26,11 @@ import qualified GHC.TypeLits.Normalise.Unify as Normalise
-- GHC API
import Outputable (Outputable (..), ($$), text)
import TcPluginM (TcPluginM, matchFam, tcPluginTrace)
+#if MIN_VERSION_ghc(8,9,0)
+import Constraint (Ct)
+#else
import TcRnMonad (Ct)
+#endif
import TcTypeNats (typeNatExpTyCon)
import Type (TyVar, coreView)
import TyCoRep (Type (..), TyLit (..))
diff --git a/src/Data/MonoTraversable.hs b/src/Data/MonoTraversable.hs
index 1ee61a1..3c9f883 100644
--- a/src/Data/MonoTraversable.hs
+++ b/src/Data/MonoTraversable.hs
@@ -1314,7 +1314,7 @@ class MonoFunctor mono => MonoComonad mono where
instance MonoComonad (ViewL a) where
oextract ~(x :< _) = x
{-# INLINE oextract #-}
- oextend f w@ ~(_ :< xxs) =
+ oextend f w@(~(_ :< xxs)) =
f w :< case Seq.viewl xxs of
EmptyL -> Seq.empty
xs -> case oextend f xs of
@@ -1324,7 +1324,7 @@ instance MonoComonad (ViewL a) where
instance MonoComonad (ViewR a) where
oextract ~(_ :> x) = x
{-# INLINE oextract #-}
- oextend f w@ ~(xxs :> _) =
+ oextend f w@(~(xxs :> _)) =
(case Seq.viewr xxs of
EmptyR -> Seq.empty
xs -> case oextend f xs of
diff --git a/Database/Persist/Sqlite.hs b/Database/Persist/Sqlite.hs
index 3bd249a..7d5a772 100644
--- a/Database/Persist/Sqlite.hs
+++ b/Database/Persist/Sqlite.hs
@@ -704,7 +704,6 @@ data SqliteConnectionInfo = SqliteConnectionInfo
, _fkEnabled :: Bool -- ^ if foreign-key constraints are enabled.
, _extraPragmas :: [Text] -- ^ additional pragmas to be set on initialization
} deriving Show
-makeLenses ''SqliteConnectionInfo
instance FromJSON SqliteConnectionInfo where
parseJSON v = modifyFailure ("Persistent: error loading SqliteConnectionInfo: " ++) $
@@ -741,6 +740,7 @@ data RawSqlite backend = RawSqlite
, _rawSqliteConnection :: Sqlite.Connection -- ^ The underlying `Sqlite.Connection`
}
makeLenses ''RawSqlite
+makeLenses ''SqliteConnectionInfo
instance HasPersistBackend b => HasPersistBackend (RawSqlite b) where
type BaseBackend (RawSqlite b) = BaseBackend b
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment