typelet 0.1.3 → 0.1.4
raw patch · 6 files changed
+37/−13 lines, 6 filesdep ~basedep ~containersdep ~ghc
Dependency ranges changed: base, containers, ghc, ghc-tcplugin-api
Files
- CHANGELOG.md +5/−0
- src/TypeLet/Plugin.hs +1/−1
- src/TypeLet/Plugin/GhcTcPluginAPI.hs +22/−3
- src/TypeLet/Plugin/Substitution.hs +1/−1
- src/TypeLet/UserAPI.hs +2/−0
- typelet.cabal +6/−8
CHANGELOG.md view
@@ -1,5 +1,10 @@ # Revision history for typelet +## 0.1.4 -- 2024-05-30++* Support ghc 9.6 (and drop ghc <= 8.8)+ [together with Gabriele Sales]+ ## 0.1.3 -- 2023-03-06 * Support ghc 9.4
src/TypeLet/Plugin.hs view
@@ -95,7 +95,7 @@ -- Solve an Equal constraint by applying the substitution and turning it -- into a nominal equality constraint solveEqual ::- TCvSubst+ Subst -> Ct -- Original Equal constraint -> GenLocated CtLoc CEqual -- Parsed Equal constraint -> TcPluginM 'Solve ((EvTerm, Ct), Ct)
src/TypeLet/Plugin/GhcTcPluginAPI.hs view
@@ -8,7 +8,7 @@ -- * Additional re-exports -- ** Substitutions- , TCvSubst+ , Subst -- opaque , Subst.substTy , Subst.substTyWith , Subst.zipTvSubst@@ -22,7 +22,6 @@ #if MIN_VERSION_ghc(9,0,0) import GHC.Core.TyCo.FVs (tyCoVarsOfType)-import GHC.Core.TyCo.Subst (TCvSubst) import GHC.Types.Var.Set (elemVarSet) import qualified GHC.Core.TyCo.Subst as Subst@@ -30,9 +29,29 @@ #else import VarSet (elemVarSet)-import TcType (TCvSubst, tyCoVarsOfType)+import TcType (tyCoVarsOfType) import qualified TcType as Subst #endif++{-------------------------------------------------------------------------------+ TCvSubst was renamed to Subst in ghc 9.6+-------------------------------------------------------------------------------}++#if MIN_VERSION_ghc(9,6,0)+import GHC.Core.TyCo.Subst (Subst)+#elif MIN_VERSION_ghc(9,0,0)+import GHC.Core.TyCo.Subst (TCvSubst)+#else+import TcType (TCvSubst)+#endif++#if !MIN_VERSION_ghc(9,6,0)+type Subst = TCvSubst+#endif++++
src/TypeLet/Plugin/Substitution.hs view
@@ -23,7 +23,7 @@ -- our use case is simpler? Needs more thought. letsToSubst :: [GenLocated CtLoc CLet]- -> Either (Cycle (GenLocated CtLoc CLet)) TCvSubst+ -> Either (Cycle (GenLocated CtLoc CLet)) Subst letsToSubst = fmap (uncurry zipTvSubst . unzip . go []) . inorder where go :: [(TyVar, Type)] -> [(TyVar, Type)] -> [(TyVar, Type)]
src/TypeLet/UserAPI.hs view
@@ -22,6 +22,8 @@ -- $setup -- >>> :set -fplugin=TypeLet+-- >>> :set -XFlexibleContexts+-- >>> :set -XScopedTypeVariables {------------------------------------------------------------------------------- Main classes
typelet.cabal view
@@ -1,7 +1,7 @@ cabal-version: 2.4 build-type: Simple name: typelet-version: 0.1.3+version: 0.1.4 synopsis: Plugin to faciliate type-level let description: For a certain class of programs, type-level let is essential in order to be able to write these programs in such a way@@ -17,7 +17,7 @@ copyright: Well-Typed LLP, Juspay Technologies Pvt Ltd category: Plugin extra-source-files: CHANGELOG.md-tested-with: GHC ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.7 || ==9.4.4+tested-with: GHC ==8.10.7 || ==9.2.8 || ==9.4.8 || ==9.6.4 source-repository head type: git@@ -34,12 +34,10 @@ TypeLet.Plugin.NameResolution TypeLet.Plugin.Substitution build-depends:- base >= 4.13 && < 4.18- , ghc-tcplugin-api >= 0.10 && < 0.11-- -- whichever versions are bundled with ghc:- , containers- , ghc+ , base >= 4.14 && < 4.19+ , containers >= 0.6 && < 0.7+ , ghc >= 8.10 && < 9.7+ , ghc-tcplugin-api >= 0.11 && < 0.12 hs-source-dirs: src default-language: