packages feed

apply-refact 0.12.0.0 → 0.13.0.0

raw patch · 4 files changed

+24/−9 lines, 4 filesdep ~basedep ~ghcdep ~ghc-exactprintPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, ghc, ghc-exactprint, transformers

API changes (from Hackage documentation)

Files

CHANGELOG view
@@ -1,3 +1,6 @@+v0.13.0.0+  * #137, support GHC 9.6 (@9999years)+ v0.12.0.0   * #134, Make libdir a parameter instead of using GHC.Paths.libdir (@fendor) 
README.md view
@@ -2,7 +2,7 @@ [`refact`](https://hackage.haskell.org/package/refact) package. It is currently integrated into [HLint](https://github.com/ndmitchell/hlint) to enable the automatic application of suggestions. -apply-refact 0.11+ support GHC 9.4 and 9.2, 0.10.x supports GHC 9.2 and 0.9.x supports GHC 8.6 through 9.0.+apply-refact 0.13.x supports GHC 9.2 through 9.6; 0.12.x and 0.11.x support GHC 9.2 and 9.4; 0.10.x supports GHC 9.2; 0.9.x supports GHC 8.6 through 9.0.  # Install 
apply-refact.cabal view
@@ -1,7 +1,7 @@-cabal-version:       2.4+cabal-version:       3.0  name:                apply-refact-version:             0.12.0.0+version:             0.13.0.0 synopsis:            Perform refactorings specified by the refact library. description:         Perform refactorings specified by the refact library. It is primarily used with HLint's --refactor flag. license:             BSD-3-Clause@@ -18,7 +18,7 @@                    , tests/examples/*.hs                    , tests/examples/*.hs.refact                    , tests/examples/*.hs.expected-tested-with:         GHC==9.4.2, GHC==9.2.5+tested-with:         GHC==9.6.1, GHC==9.4.5, GHC==9.2.7   source-repository head@@ -32,19 +32,21 @@                    , Refact.Internal                    , Refact.Compat   GHC-Options: -Wall-  build-depends: base >=4.15 && < 5+  build-depends: base >=4.16 && < 5                , refact >= 0.2                , ghc-boot-th-               , ghc-exactprint ^>= 1.6.0 || ^>= 1.5.0+               , ghc-exactprint ^>= 1.5.0 || ^>= 1.6.0 || ^>= 1.7.0                , containers >= 0.6.0.1 && < 0.7                , extra >= 1.7.3                , syb >= 0.7.1                , process >= 1.6-               , transformers >= 0.5.6.2 && < 0.6+               , transformers >= 0.5.6.2 && < 0.7                , filemanip >= 0.3.6.3 && < 0.4                , uniplate >= 1.6.13                , unix-compat >= 0.5.2                , directory >= 1.3+  if (impl(ghc >= 9.6) && impl(ghc < 9.7))+    build-depends: ghc ^>= 9.6   if (impl(ghc >= 9.4) && impl(ghc < 9.5))     build-depends: ghc ^>= 9.4   if (impl(ghc >= 9.2) && impl(ghc < 9.3))
src/Refact/Compat.hs view
@@ -111,10 +111,14 @@ import GHC.Data.StringBuffer (stringToStringBuffer) #if MIN_VERSION_ghc(9,4,0) import GHC.Driver.Config.Parser-import GHC.Driver.Errors.Types (ErrorMessages, ghcUnknownMessage)+import GHC.Driver.Errors.Types (ErrorMessages, ghcUnknownMessage, GhcMessage) #endif import GHC.Driver.Session hiding (initDynFlags)+#if MIN_VERSION_ghc(9,6,0)+import GHC.Hs hiding (Pat, Stmt, parseModuleName)+#else import GHC.Hs hiding (Pat, Stmt)+#endif import GHC.Parser.Header (getOptions) #if MIN_VERSION_ghc(9,4,0) import GHC.Types.Error (getMessages)@@ -145,7 +149,11 @@  type MonadFail' = MonadFail +#if MIN_VERSION_ghc(9,6,0)+type Module = Located (HsModule GhcPs)+#else type Module = Located HsModule+#endif  type Errors = ErrorMessages @@ -153,7 +161,9 @@ onError s = pprPanic s . vcat . ppp  ppp :: Errors -> [SDoc]-#if MIN_VERSION_ghc(9,4,0)+#if MIN_VERSION_ghc(9,6,0)+ppp pst = concatMap unDecorated $ fmap ((diagnosticMessage (defaultDiagnosticOpts @GhcMessage)) . errMsgDiagnostic) $ bagToList $ getMessages pst+#elif MIN_VERSION_ghc(9,4,0) ppp pst = concatMap unDecorated $ fmap (diagnosticMessage . errMsgDiagnostic) $ bagToList $ getMessages pst #else ppp pst = concatMap unDecorated (errMsgDiagnostic <$> bagToList pst)