ghc-tcplugins-extra 0.3 → 0.3.1
raw patch · 3 files changed
+25/−4 lines, 3 filesdep ~ghcPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: ghc
API changes (from Hackage documentation)
Files
- CHANGELOG.md +3/−0
- ghc-tcplugins-extra.cabal +4/−4
- src/GHC/TcPluginM/Extra.hs +18/−0
CHANGELOG.md view
@@ -1,3 +1,6 @@+## 0.3.1 *January 6th 2020*+* Support for GHC-8.9+ ## 0.3 *May 8th 2018* * Fix bug where results of `flattenGivens` was ambiguous
ghc-tcplugins-extra.cabal view
@@ -1,5 +1,5 @@ name: ghc-tcplugins-extra-version: 0.3+version: 0.3.1 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 +17,8 @@ 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, GHC == 8.10.1 source-repository head type: git@@ -33,7 +33,7 @@ library exposed-modules: GHC.TcPluginM.Extra build-depends: base >=4.8 && <5,- ghc >=7.10 && <8.6+ ghc >=7.10 && <8.12 hs-source-dirs: src default-language: Haskell2010 other-extensions: CPP
src/GHC/TcPluginM/Extra.hs view
@@ -75,9 +75,13 @@ import TcPluginM (FindResult (..), TcPluginM, findImportedModule, lookupOrig, tcPluginTrace) import qualified TcPluginM+#if __GLASGOW_HASKELL__ < 809 import TcRnTypes (CtEvidence (..), CtLoc, TcPlugin (..), TcPluginResult (..))+#else+import TcRnTypes (TcPlugin (..), TcPluginResult (..)) #endif+#endif #if __GLASGOW_HASKELL__ < 802 import TcPluginM (tcPluginIO) #endif@@ -93,9 +97,18 @@ import Data.Function (on) import Data.List (groupBy, partition, sortOn) import Data.Maybe (mapMaybe)+#if __GLASGOW_HASKELL__ < 809 import TcRnTypes (Ct (..), ctLoc, ctEvId, mkNonCanonical)+#else+import Constraint+ (Ct (..), CtEvidence (..), CtLoc, ctLoc, ctEvId, mkNonCanonical)+#endif import TcType (TcTyVar, TcType)+#if __GLASGOW_HASKELL__ < 809 import Type (mkPrimEqPred)+#else+import Predicate (mkPrimEqPred)+#endif import TyCoRep (Type (..)) #endif @@ -371,8 +384,13 @@ -- TODO: Is it safe to do "dumb" substitution under binders? -- ForAllTy tv (substType subst ty) t+#if __GLASGOW_HASKELL__ >= 809+substType subst (FunTy af t1 t2) =+ FunTy af (substType subst t1) (substType subst t2)+#else substType subst (FunTy t1 t2) = FunTy (substType subst t1) (substType subst t2)+#endif substType _ l@(LitTy _) = l substType subst (CastTy ty co) = CastTy (substType subst ty) co