packages feed

ghc-hs-meta 0.1.4.0 → 0.1.5.0

raw patch · 4 files changed

+25/−11 lines, 4 filesdep ~basedep ~ghcdep ~ghc-bootPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, ghc, ghc-boot, template-haskell

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+# 0.1.5.0++ * Support GHC 9.12+ # 0.1.4.0   * Support GHC 9.10
README.md view
@@ -1,7 +1,7 @@ # ghc-hs-meta  Generate Template Haskell expressions from Haskell source code using the GHC parser.-This package runs on GHC versions 8.10, 9.0, 9.2, 9.4, 9.6 and 9.8.+This package runs on GHC versions 8.10, 9.0, 9.2, 9.4, 9.6, 9.8 and 9.10.  ## Usage 
ghc-hs-meta.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: ghc-hs-meta-version: 0.1.4.0+version: 0.1.5.0 build-type: Simple author: Zachary Wood maintainer: amesgen@amesgen.de@@ -17,9 +17,10 @@   ghc ==9.0.2   ghc ==9.2.8   ghc ==9.4.8-  ghc ==9.6.5-  ghc ==9.8.2+  ghc ==9.6.6+  ghc ==9.8.4   ghc ==9.10.1+  ghc ==9.12.1  extra-source-files:   CHANGELOG.md@@ -40,11 +41,11 @@    ghc-options: -Wall   build-depends:-    base >=4.14 && <4.21,+    base >=4.14 && <4.22,     bytestring >=0.10 && <0.13,-    ghc >=8.10.7 && <9.11,-    ghc-boot >=8.10.7 && <9.11,-    template-haskell >=2.16.0 && <2.23,+    ghc >=8.10.7 && <9.13,+    ghc-boot >=8.10.7 && <9.13,+    template-haskell >=2.16.0 && <2.24,    default-language: Haskell2010 
src/Language/Haskell/Meta/Translate.hs view
@@ -91,6 +91,9 @@ toLit (HsRat _ f _) = TH.FloatPrimL (fl_value f) toLit (HsFloatPrim _ f) = TH.FloatPrimL (fl_value f) toLit (HsDoublePrim _ f) = TH.DoublePrimL (fl_value f)+#if MIN_VERSION_ghc(9,12,0)+toLit (HsMultilineString _ s) = TH.StringL (unpackFS s)+#endif #if MIN_VERSION_ghc(9,8,0) toLit HsInt8Prim{} = noTH "toLit" "HsInt8Prim" toLit HsInt16Prim{} = noTH "toLit" "HsInt16Prim"@@ -177,7 +180,9 @@   = TH.AppE (TH.VarE 'negate) (toExp d . unLoc $ e)  -- NOTE: for lambda, there is only one match-#if MIN_VERSION_ghc(9,10,0)+#if MIN_VERSION_ghc(9,12,0)+toExp d (Expr.HsLam _ LamSingle (Expr.MG _ (unLoc -> (map unLoc -> [Expr.Match _ _ (map unLoc . unLoc -> ps) (Expr.GRHSs _ [unLoc -> Expr.GRHS _ _ (unLoc -> e)] _)]))))+#elif MIN_VERSION_ghc(9,10,0) toExp d (Expr.HsLam _ LamSingle (Expr.MG _ (unLoc -> (map unLoc -> [Expr.Match _ _ (map unLoc -> ps) (Expr.GRHSs _ [unLoc -> Expr.GRHS _ _ (unLoc -> e)] _)])))) #elif MIN_VERSION_ghc(9,6,0) toExp d (Expr.HsLam _ (Expr.MG _ (unLoc -> (map unLoc -> [Expr.Match _ _ (map unLoc -> ps) (Expr.GRHSs _ [unLoc -> Expr.GRHS _ _ (unLoc -> e)] _)]))))@@ -259,12 +264,16 @@     (FromThenTo a b c) -> TH.FromThenToR (toExp d $ unLoc a) (toExp d $ unLoc b) (toExp d $ unLoc c)  #if MIN_VERSION_ghc(9, 6, 0)+#if MIN_VERSION_ghc(9, 12, 0) toExp _ (Expr.HsProjection _ locatedFields) =+#else+toExp _ (Expr.HsProjection _ (fmap unLoc -> locatedFields)) =+#endif   let     extractFieldLabel (DotFieldOcc _ locatedStr) = field_label <$> locatedStr     extractFieldLabel _ = error "Don't know how to handle XHsFieldLabel constructor..."   in-    TH.ProjectionE (NonEmpty.map (unpackFS . unLoc . extractFieldLabel . unLoc) locatedFields)+    TH.ProjectionE (NonEmpty.map (unpackFS . unLoc . extractFieldLabel) locatedFields)  toExp d (Expr.HsGetField _ expr locatedField) =   let@@ -303,7 +312,7 @@ #endif  -#if MIN_VERSION_ghc(9, 2, 0) && !MIN_VERSION_ghc(9, 6, 0)+#if (MIN_VERSION_ghc(9, 2, 0) && !MIN_VERSION_ghc(9, 6, 0)) || MIN_VERSION_ghc(9, 12, 0) toExp _ (Expr.HsOverLabel _ fastString) = TH.LabelE (unpackFS fastString) #else toExp _ (Expr.HsOverLabel _ _ fastString) = TH.LabelE (unpackFS fastString)