ghc-source-gen 0.4.4.1 → 0.4.5.0
raw patch · 8 files changed
+76/−22 lines, 8 filesdep ~ghcdep ~tastyPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: ghc, tasty
API changes (from Hackage documentation)
Files
- ChangeLog.md +3/−0
- ghc-source-gen.cabal +8/−8
- src/GHC/SourceGen/Binds/Internal.hs +8/−2
- src/GHC/SourceGen/Expr.hs +3/−1
- src/GHC/SourceGen/Module.hs +20/−3
- src/GHC/SourceGen/Overloaded.hs +19/−6
- src/GHC/SourceGen/Syntax/Internal.hs +12/−1
- src/GHC/SourceGen/Type.hs +3/−1
ChangeLog.md view
@@ -1,6 +1,9 @@ # Changelog for haskell-syntax +# 0.4.5.0+- Support GHC 9.8.+ # 0.4.4.1 - Repair unintentionally broken GHC 8.10.7 support.
ghc-source-gen.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: ghc-source-gen-version: 0.4.4.1+version: 0.4.5.0 synopsis: Constructs Haskell syntax trees for the GHC API. description: @ghc-source-gen@ is a library for generating Haskell source code. It uses the <https://hackage.haskell.org/package/ghc ghc> library@@ -61,7 +61,7 @@ TypeSynonymInstances build-depends: base >=4.7 && <5- , ghc >=8.4 && <9.7+ , ghc >=8.4 && <9.9 default-language: Haskell2010 if impl(ghc<8.10) other-modules:@@ -104,9 +104,9 @@ build-depends: QuickCheck >=2.10 && <2.15 , base >=4.7 && <5- , ghc >=8.4 && <9.7+ , ghc >=8.4 && <9.9 , ghc-source-gen- , tasty >=1.0 && <1.5+ , tasty >=1.0 && <1.6 , tasty-hunit ==0.10.* , tasty-quickcheck >=0.9 && <0.11 default-language: Haskell2010@@ -125,10 +125,10 @@ TypeSynonymInstances build-depends: base >=4.7 && <5- , ghc >=8.4 && <9.7+ , ghc >=8.4 && <9.9 , ghc-paths ==0.1.* , ghc-source-gen- , tasty >=1.0 && <1.5+ , tasty >=1.0 && <1.6 , tasty-hunit ==0.10.* default-language: Haskell2010 if impl(ghc<9.0)@@ -151,10 +151,10 @@ TypeSynonymInstances build-depends: base >=4.7 && <5- , ghc >=8.4 && <9.7+ , ghc >=8.4 && <9.9 , ghc-paths ==0.1.* , ghc-source-gen- , tasty >=1.0 && <1.5+ , tasty >=1.0 && <1.6 , tasty-hunit ==0.10.* default-language: Haskell2010 if impl(ghc<9.0)
src/GHC/SourceGen/Binds/Internal.hs view
@@ -8,7 +8,11 @@ module GHC.SourceGen.Binds.Internal where #if MIN_VERSION_ghc(9,0,0)-import GHC.Types.Basic (Origin(Generated))+import GHC.Types.Basic ( Origin(Generated)+#if MIN_VERSION_ghc(9,8,0)+ , DoPmc (DoPmc)+#endif+ ) import GHC.Data.Bag (listToBag) #else import BasicTypes (Origin(Generated))@@ -83,7 +87,9 @@ matchGroup :: HsMatchContext' -> [RawMatch] -> MatchGroup' LHsExpr' matchGroup context matches =-#if MIN_VERSION_ghc(9,6,0)+#if MIN_VERSION_ghc(9,8,0)+ MG (Generated DoPmc)+#elif MIN_VERSION_ghc(9,6,0) MG Generated #else noExt MG
src/GHC/SourceGen/Expr.hs view
@@ -294,7 +294,9 @@ } withPlaceHolder4 = withPlaceHolder . withPlaceHolder . withPlaceHolder . withPlaceHolder-#if MIN_VERSION_ghc(9,2,0)+#if MIN_VERSION_ghc(9,8,0)+ toRecordUpdFields = noExt RegularRecUpdFields+#elif MIN_VERSION_ghc(9,2,0) toRecordUpdFields = Left #else toRecordUpdFields = id
src/GHC/SourceGen/Module.hs view
@@ -177,7 +177,7 @@ -- > ===== -- > thingAll "A" thingAll :: RdrNameStr -> IE'-thingAll = withEpAnnNotUsed IEThingAll . wrappedName+thingAll = withEpAnnNotUsed' IEThingAll . wrappedName -- | Exports specific methods and/or constructors. --@@ -185,7 +185,7 @@ -- > ===== -- > thingWith "A" ["b", "C"] thingWith :: RdrNameStr -> [OccNameStr] -> IE'-thingWith n cs = withEpAnnNotUsed IEThingWith (wrappedName n) NoIEWildcard+thingWith n cs = withEpAnnNotUsed' IEThingWith (wrappedName n) NoIEWildcard (map (wrappedName . unqual) cs) #if !MIN_VERSION_ghc(9,2,0) -- The parsing step leaves the list of fields empty@@ -212,4 +212,21 @@ -- > ===== -- > moduleContents "M" moduleContents :: ModuleNameStr -> IE'-moduleContents = withEpAnnNotUsed IEModuleContents . mkLocated . unModuleNameStr+moduleContents = withEpAnnNotUsed' IEModuleContents . mkLocated . unModuleNameStr+++#if MIN_VERSION_ghc(9,8,0)+withEpAnnNotUsed' :: ((Maybe x, EpAnn ann) -> a) -> a+withEpAnnNotUsed' = ($ (Nothing, EpAnnNotUsed))+#else++#if MIN_VERSION_ghc(9,2,0)+withEpAnnNotUsed' :: (EpAnn ann -> a) -> a+#elif MIN_VERSION_ghc(8,6,0)+withEpAnnNotUsed' :: (NoExtField -> a) -> a+#else+withEpAnnNotUsed' :: a -> a+#endif+withEpAnnNotUsed' = withEpAnnNotUsed++#endif
src/GHC/SourceGen/Overloaded.hs view
@@ -21,6 +21,9 @@ import GHC.Hs.Type ( HsType(..) , HsTyVarBndr(..)+#if MIN_VERSION_ghc(9,8,0)+ , HsBndrVis (HsBndrRequired)+#endif ) import GHC.Hs (IE(..), IEWrappedName(..) #if MIN_VERSION_ghc(9,6,0)@@ -280,8 +283,11 @@ #if MIN_VERSION_ghc(9,0,0) instance BVar HsTyVarBndr' where+#if MIN_VERSION_ghc(9,8,0)+ bvar = withEpAnnNotUsed UserTyVar HsBndrRequired . typeRdrName . UnqualStr+#else bvar = withEpAnnNotUsed UserTyVar () . typeRdrName . UnqualStr-+#endif instance BVar HsTyVarBndrS' where bvar = withEpAnnNotUsed UserTyVar SpecifiedSpec . typeRdrName . UnqualStr #else@@ -290,14 +296,21 @@ #endif instance Var IE' where- var n =- noExt IEVar $ mkLocated $+ var n = ie_var $ mkLocated $ ie_name $ exportRdrName n+ where+ ie_var =+#if MIN_VERSION_ghc(9,8,0)+ IEVar Nothing+#else+ noExt IEVar+#endif++ ie_name = #if MIN_VERSION_ghc(9,6,0)- (IEName noExtField)+ noExt IEName #else- IEName+ IEName #endif- $ exportRdrName n instance BVar IE' where bvar = var . UnqualStr
src/GHC/SourceGen/Syntax/Internal.hs view
@@ -80,6 +80,10 @@ import GHC.Hs.Type (Promoted(..)) #endif +#if MIN_VERSION_ghc(9,8,0)+import GHC.Hs.Type (HsBndrVis)+#endif+ #if MIN_VERSION_ghc(8,10,0) import qualified GHC.Hs as GHC #elif MIN_VERSION_ghc(8,6,0)@@ -281,7 +285,10 @@ -- Instances: -- -- * 'GHC.SourceGen.Overloaded.BVar'-#if MIN_VERSION_ghc(9,0,0)+#if MIN_VERSION_ghc(9,8,0)+type HsTyVarBndr' = HsTyVarBndr (HsBndrVis GhcPs) GhcPs+type HsTyVarBndrS' = HsTyVarBndr Specificity GhcPs+#elif MIN_VERSION_ghc(9,0,0) type HsTyVarBndr' = HsTyVarBndr () GhcPs type HsTyVarBndrS' = HsTyVarBndr Specificity GhcPs #else@@ -323,7 +330,11 @@ type LHsWcType' = LHsWcType GhcPs type HsDerivingClause' = HsDerivingClause GhcPs type LHsRecField' arg = LHsRecField GhcPs arg+#if MIN_VERSION_ghc(9,8,0)+type LHsRecUpdField' = LHsRecUpdField GhcPs GhcPs+#else type LHsRecUpdField' = LHsRecUpdField GhcPs+#endif type LPat' = LPat GhcPs type TyFamInstDecl' = TyFamInstDecl GhcPs
src/GHC/SourceGen/Type.hs view
@@ -119,7 +119,9 @@ -- > kindedVar "x" (var "A") kindedVar :: OccNameStr -> HsType' -> HsTyVarBndr' kindedVar v t = withEpAnnNotUsed KindedTyVar-#if MIN_VERSION_ghc(9,0,0)+#if MIN_VERSION_ghc(9,8,0)+ HsBndrRequired+#elif MIN_VERSION_ghc(9,0,0) () #endif (typeRdrName $ UnqualStr v) (mkLocated t)