packages feed

ghc-lib-parser-ex 0.20200801 → 0.20200901

raw patch · 6 files changed

+37/−4 lines, 6 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,5 +1,11 @@ # Changelog for ghc-lib-parser-ex +## 0.20200901 released 2020-09-01+- Update to `ghc-lib-0.20200901`++## 8.10.0.16 released 2020-08-08+- Update to ghc-8.10.2.+ ## 0.20200801 released 2020-08-01 - Update to `ghc-lib-0.20200801` 
ghc-lib-parser-ex.cabal view
@@ -1,6 +1,6 @@ cabal-version: >= 1.18 name:           ghc-lib-parser-ex-version:        0.20200801+version:        0.20200901 description:    Please see the README on GitHub at <https://github.com/shayne-fletcher/ghc-lib-parser-ex#readme> homepage:       https://github.com/shayne-fletcher/ghc-lib-parser-ex#readme bug-reports:    https://github.com/shayne-fletcher/ghc-lib-parser-ex/issues
src/Language/Haskell/GhclibParserEx/GHC/Hs/ExtendInstances.hs view
@@ -20,6 +20,7 @@  #if defined (GHCLIB_API_811) import GHC.Utils.Outputable+import GHC.Driver.Ppr #else import Outputable #endif@@ -39,7 +40,11 @@ -- string representations. toStr :: Data a => HsExtendInstances a -> String toStr (HsExtendInstances e) =+#if defined(GHCLIB_API_811)+  showPprUnsafe $ showAstData BlankSrcSpan e+#else   showSDocUnsafe $ showAstData BlankSrcSpan e+#endif  instance Data a => Eq (HsExtendInstances a) where (==) a b = toStr a == toStr b instance Data a => Ord (HsExtendInstances a) where compare = compare `on` toStr@@ -52,4 +57,9 @@  -- Use 'ppr' for 'Show'. instance Outputable a => Show (HsExtendInstances a) where-  show (HsExtendInstances e) =  showSDocUnsafe $ ppr e+  show (HsExtendInstances e) =+#if defined(GHCLIB_API_811)+    showPprUnsafe $ ppr e+#else+    showSDocUnsafe $ ppr e+#endif
src/Language/Haskell/GhclibParserEx/GHC/Parser.hs view
@@ -89,7 +89,12 @@ parseDeclaration = parse Parser.parseDeclaration  parseExpression :: String -> DynFlags -> ParseResult (LHsExpr GhcPs)-#if defined (GHCLIB_API_811) || defined (GHCLIB_API_810)+#if defined (GHCLIB_API_811)+parseExpression s flags =+  case parse Parser.parseExpression s flags of+    POk s e -> unP (runPV . unECP $ e) s+    PFailed ps -> PFailed ps+#elif defined (GHCLIB_API_810) parseExpression s flags =   case parse Parser.parseExpression s flags of     POk s e -> unP (runECP_P e) s
src/Language/Haskell/GhclibParserEx/GHC/Utils/Outputable.hs view
@@ -10,9 +10,15 @@  #if defined (GHCLIB_API_811) import GHC.Utils.Outputable+import GHC.Driver.Ppr #else import Outputable #endif  unsafePrettyPrint :: Outputable a => a -> String-unsafePrettyPrint = showSDocUnsafe . ppr+unsafePrettyPrint =+#if defined(GHCLIB_API_811)+  showPprUnsafe . ppr+#else+  showSDocUnsafe . ppr+#endif
test/Test.hs view
@@ -48,6 +48,7 @@ import GHC.Driver.Session import GHC.Parser.Lexer import GHC.Utils.Outputable+import GHC.Driver.Ppr import GHC.Utils.Error import GHC.Types.Name.Reader import GHC.Types.Name.Occurrence@@ -63,6 +64,11 @@ import GHC.LanguageExtensions.Type #if defined (GHCLIB_API_808) import Bag+#endif++#if defined(GHCLIB_API_811)+showSDocUnsafe :: SDoc -> String+showSDocUnsafe = showPprUnsafe #endif  main :: IO ()