packages feed

ghc-exactprint 1.6.0 → 1.6.1

raw patch · 3 files changed

+17/−1 lines, 3 filesdep ~ghcPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: ghc

API changes (from Hackage documentation)

Files

ChangeLog view
@@ -1,3 +1,5 @@+2022-11-08 v1.6.1+	* Support GHC 9.4.3 2022-09-30 v1.6.0 	* Support GHC 9.4.1 and GHC 9.4.2 2022-02-01 v1.5.0
ghc-exactprint.cabal view
@@ -1,5 +1,5 @@ name:                ghc-exactprint-version:             1.6.0+version:             1.6.1 synopsis:            ExactPrint for GHC description:         Using the API Annotations available from GHC 9.2.1, this                      library provides a means to round trip any code that can@@ -17,6 +17,7 @@ build-type:          Simple tested-with:         GHC == 9.4.1                    , GHC == 9.4.2+                   , GHC == 9.4.3 extra-source-files:  ChangeLog                      tests/examples/failing/*.hs                      tests/examples/ghc710-only/*.hs
src/Language/Haskell/GHC/ExactPrint/ExactPrint.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP   #-} {-# LANGUAGE DeriveDataTypeable   #-} {-# LANGUAGE FlexibleContexts     #-} {-# LANGUAGE FlexibleInstances    #-}@@ -42,6 +43,9 @@ import GHC.Types.Basic hiding (EP) import GHC.Types.Fixity import GHC.Types.ForeignCall+#if MIN_VERSION_ghc(9,4,3)+import GHC.Types.Name.Reader+#endif import GHC.Types.SourceText import GHC.Types.PkgQual import GHC.Types.Var@@ -3223,10 +3227,19 @@    setAnnotationAnchor (DotFieldOcc an a) anc cs = DotFieldOcc (setAnchorEpa an anc cs) a +#if MIN_VERSION_ghc(9,4,3)+  exact (DotFieldOcc an (L loc fs)) = do+    an0 <- markLensKwM an lafDot  AnnDot+    -- The field name has a SrcSpanAnnN, print it as a+    -- LocatedN RdrName+    L loc' _ <- markAnnotated (L loc (mkVarUnqual fs))+    return (DotFieldOcc an0 (L loc' fs))+#else   exact (DotFieldOcc an fs) = do     an0 <- markLensKwM an lafDot  AnnDot     fs' <- markAnnotated fs     return (DotFieldOcc an0 fs')+#endif  -- ---------------------------------------------------------------------