Used by 1 package in lts-16.31(full list with versions):

ghc-lib-parser-ex License BSD3 Hackage version Stackage version Build Status

Copyright © 2020, Shayne Fletcher. All rights reserved. SPDX-License-Identifier: BSD-3-Clause

The ghc-lib-parser-ex package contains GHC API parse tree utilities. It works with or without ghc-lib-parser.

Using ghc-lib-parser-ex

Package ghc-lib-parser-ex is on Hackage e.g. cabal install ghc-lib-parser-ex. Like ghc-lib-parser, there are two release streams within the ghc-lib-parser-ex name.

Versioning policy

Package ghc-lib-parser-ex does not conform to the Haskell Package Versioning Policy. Version numbers are of the form α.β.γ.δ where α.β corresponds to a GHC series and γ.δ are the major and minor parts of the ghc-lib-ex-parser package release. Examples:

  • Version is compatible with any ghc-lib-parser-8.10.* (or ghc-8.10.*) package;
  • Version 0.20190204.2.0 is compatible with ghc-lib-parser-0.20190204.

The major part γ of the release number indicates an interface breaking change from the previous release. The minor part δ indicates a non-interface breaking change from the previous release.

Building ghc-lib-parser-ex

You can build with stack build and test with stack test. Produce ghc-lib-parser-ex package distributions by executing the CI script:

# Setup
git clone [email protected]:shayne-fletcher/ghc-lib-parser-ex.git
cd ghc-lib-parser-ex
stack runhaskell --package extra --package optparse-applicative CI.hs

Run stack runhaskell --package extra --package optparse-applicative CI.hs -- --help for more options.

To run hlint on this repository, hlint --cpp-include cbits --cpp-define GHCLIB_API_XXX . (where XXX at this time is one of 808, 810 or 900).

Releasing ghc-lib-parser-ex (notes for maintainers)

Update the changelog, git tag <version> && git push origin <version> then build via the above instructions and upload the resulting .tar.gz files to Hackage.


Changelog for ghc-lib-parser-ex released 2020-12-20

  • Update to ghc-8.10.3.

0.20201101 released 2020-11-01

  • Update to ghc-lib-0.20201101

0.20201001 released 2020-10-01

  • Update to ghc-lib-0.20201001
  • Add support for GHCLIB_API_900

0.20200901 released 2020-09-01

  • Update to ghc-lib-0.20200901 released 2020-08-08

  • Update to ghc-8.10.2.

0.20200801 released 2020-08-01

  • Update to ghc-lib-0.20200801 released 2020-07-16

0.20200704 released 2020-07-04

  • New function isImportQualifiedPost released 2020-07-04

  • New function isImportQualifiedPost released 2020-06-10

  • New function isSymbolRdrName
  • New module
    • Language.Haskell.GhclibParserEx.GHC.Settings.Config to replace Language.Haskell.GhclibParserEx.Config (which remains for now but deprecated and will be removed in a future release)

0.20200601 released 2020-06-01 released 2020-05-31

  • Sync extra with HLint released 2020-05-31

  • New module Language.Haskell.GhclibParserEx.GHC.Hs released 2020-05-18

  • Upgrade to ghc-lib-parser- released 2020-05-18

  • Upgrade to ghc-lib-parser- released 2020-05-16

  • New modules
    • Language.Haskell.GhclibParserEx.GHC.Hs.Binds
    • Language.Haskell.GhclibParserEx.GHC.Hs.ImpExp released 2020-05-14

  • New module Language.Haskell.GhclibParserEx.GHC.Types.Name.Reader released 2020-05-13

  • New function fixitiesFromModule released 2020-05-05

  • Bugfix in parsePragmasIntoDynFlags that meant that default enabled/disabled extensions subsequently disabled/enabled via pragma weren’t getting disabled/enabled released 2020-05-02

  • New modules
    • Language.Haskell.GhclibParserEx.GHC.Parser, Language.Haskell.GhcLibParserEx.GHC.Utils.Outputable to replace Language.Haskell.GhclibParserEx.Parse and Language.Haskell.GhclibParserEx.Outputable (which remain for now but deprecated and will be removed in a future release)

0.20200501 released 2020-05-01 released 2020-04-04

  • Add expression predicates isWholeFrac, isFieldPunUpdate, isStrictMatch, isMultiIf, isProc, isTransStmt;
  • Add pattern predicate isPFieldPun. released 2020-04-03

  • strToPat now returns an LPat GhcPs
  • parseExpression now returns an ParseResult (LHsExpr GhcPs) (>= ghc-8.10)

0.20200401 released 2020-04-01 released 2020-03-30

  • Rework cabal flags; allow full configurability with a good default:
    • Have two flags auto and no-ghc-lib. Default behavior exactly as hlint linking ghc-lib-parser-8.10.* if not on ghc-8.10.* and ghc-8.10.* otherwise. released 2020-03-28

  • Unless the Cabal flag ghc-lib is true link native ghc-libs (without regard for the compiler version)
  • Change the signature of hasPFieldsDotDot
    • This has no impact on 8.8 parse trees but matters when it comes to >= 8.10
  • Change the signature of isPFieldWildcard
    • This has no impact on 8.8 parse trees but matters when it comes to >= 8.10 released 2020-03-24

  • First release of the ghc-8.10 series released 2020-03-22

  • Language.Haskell.GhclibParserEx.DynFlags is now Language.Haskell.GhclibParserEx.GHC.Driver.Session released 2020-03-17 released 2020-03-16 released 2020-03-13

  • From Language.Haskell.GhclibParserEx.Fixity:
    • Expose infixr_, infixl_, infix_ and fixity released 2020-03-12

  • Remove from Language.Haskell.GhclibParserEx.Fixity:
    • preludeFixities
    • baseFixities released 2020-03-11

  • Expose from Language.Haskell.GhclibParserEx.Fixity:
    • preludeFixities
    • baseFixities
    • lensFixities
    • otherFixities

0.20200301 released 2020-03-01 released 2020-02-25

  • New modules:
    • Language.Haskell.GhclibParserEx.Pat
    • Language.Haskell.GhclibParserEx.Types
    • Language.Haskell.GhclibParserEx.Decls released 2020-02-16

  • New DynFlags functions readExtension, extensionImplications. released 2020-02-09

  • Expression predicate tests. released 2020-02-07 released 2020-02-01

  • New modules:
    • Language.Haskell.GhclibparserEx.GHC.Hs.Expr
  • Moved modules:
    • Language.Haskell.GhclibparserEx.HsExtendInstances -> Language.Haskell.GhclibparserEx.GHC.Hs.ExtendInstances;

0.20200201.1.0 released 2020-02-01

  • New modules:
    • Language.Haskell.GhclibparserEx.HsExtendInstances. released 2020-01-25

  • Change in versioning scheme;
  • New modules:
    • Language.Haskell.GhclibParserEx.Config
    • Language.Haskell.GhclibParserEx.DynFlags
  • parsePragmasIntoDynFlags signature change., 8.8.2, 0.20200102 released 2020-01-18

  • First releases