Changelog of @hackage/haskell-src-exts 1.9.5

1.9.4 --> 1.9.5

  • Fix a bug where deriving clauses for GADT-style data declarations were not properly indented.

  • Pretty-printing patterns is now more accurate in inserting (and not inserting) parentheses when needed.

** 1.9.x

1.9.3 --> 1.9.4

  • Pretty-printer now inserts parentheses in clever places when printing kinds.

  • Pretty-printing expressions is now far more accurate in inserting (and not inserting) parentheses when needed.

  • Pretty-printing negative expressions no longer inserts a superfluous space between the - and the expression.

1.9.2 --> 1.9.3

  • Constructors for newtype declarations must now have exactly one argument. This is only when using the classic syntax, not with GADT-style syntax.

  • Fix a bug where preceding commas in tuple sections were counted one too few.

1.9.1 --> 1.9.2

  • Fix a bug with pretty-printing lexer tokens.

  • Fix a bug where non-colon TypeOperators could not be used in prefix mode.

1.9.0 --> 1.9.1

  • Export parseFileContentsWithExts from .Exts.

1.8.2 --> 1.9.0

  • OptionPragma is renamed to the more descriptive ModulePragma, and adds a constructor AnnModulePragma for handling ANN pragmas preceding module header.

  • Add instances for Eq/Ord/Data/Typeable for Fixity.

  • Add 'parseFileWithComments' and 'parseFileContentsWithComments' to L.H.Exts .

  • More informative error messages when HSX tags are mismatched.

** 1.8.x

1.8.1 --> 1.8.2

  • Don't insert redundant parentheses around record constructions and updates.

1.8.0 --> 1.8.1

  • Fix three bugs with the handling of ANN. I must have been really tired when implementing that support.

1.7.2 --> 1.8.0

  • Add an instance Show Fixity (derived).

  • Support for the new ANN and INLINE_CONLIKE pragmas.

  • Export knownExtensions from .Extension.

  • Remove support for CFILES and INCLUDE pragmas. The support wasn't correct anyway, as it assumed the pragmas appeared at the top of files. As CFILES/INCLUDE pragmas can (and do) appear anywhere, there's no hope to support them in the AST. Better to remove the support altogether. Files with CFILES/INCLUDE pragmas can still be parsed of course, but those pragmas will be handled as comments.

  • Parsing with ignoreLinePragmas = False now correctly updates the file name.

  • Allow the whole SPECIALISE/INLINE family of pragmas in instance declarations. The InsInline constructor is removed, and is now represented by InsDecl (InlineSig ...).

  • Fix a bug with line numbering and quasi quotes, and a similar one with line numbering and CDATA.

  • Fix a few minor bugs in the exactPrinter.

  • Fix the strange handling of so called strings in LINE pragmas.

** 1.7.x

1.7.1 --> 1.7.2

  • Fixes a bug in lexing LINE pragmas (used when ignoreLinePragmas is set to False).

1.7.0 --> 1.7.1

  • UnicodeSyntax now also enables the forall symbol (U+2200).

1.6.1 --> 1.7.0

  • Operators defined on the form

    (a op b) c = ...

    could not be handled by the (annotated) AST, nor the parser. I had to change the definition of the AST node for InfixMatch to allow a list of right-hand subpatterns, i.e.

    InfixMatch l (Pat l) (Name l) (Pat l) ...

    has become

    InfixMatch l (Pat l) (Name l) [Pat l] ...

    I also had an epiphany and fixed the issue that would arise with exact printing of prefix definitions including parentheses, so that now works too!

** 1.6.x

1.6.0 --> 1.6.1

  • UnicodeSyntax now works not only for identifiers, but also for ->, <- and =>, as well as Arrows arrows and kind stars.

1.5.3 --> 1.6.0

  • (=~=) turns out to be too general at Functor (for intuitive and not technical reasons), so is specialised to Annotated to closer mirror the original intention.

  • applyFixities is hoisted to a monad, and now fails on ambiguous infix expressions.

** 1.5.x

1.5.2 --> 1.5.3

  • Several small bug fixes in the exact printer, and fail more gracefully if the number of srcInfoPoints doesn't match the needs of the node.

1.5.1 --> 1.5.2

  • Fix a bug in the exact printer that made it always print the first token at position (0,0).

  • In fixing the above, Annotated is now a superclass of ExactP. It was already a superclass in spirit, and nothing can break from this since ExactP is only exported abstractly.

1.5.0 --> 1.5.1

  • The pretty printer now introduces parentheses for non-atomic arguments to function application. Note that infix applications are left untouched, no parentheses will be inserted there, as it is assumed that fixities are already properly resolved.

  • Fix a bug in the pretty printer where view patterns and n+k patterns were not properly parenthesised.

1.4.0 --> 1.5.0

  • Add support for acting on LINE pragmas while parsing, i.e. updating the source position according to info given in LINE pragmas. This is done conditionally based on a new flag ignoreLinePragmas in the ParseMode, hence the need to increase the major version.

** 1.4.x

1.3.5 --> 1.4.0

  • The AST node for Proc in the simple AST is changed to include a SrcLoc argument, to make it consistent with similar nodes e.g. Lambda. This is specifically needed for transformation of patterns in HSX.

** 1.3.x

1.3.4 --> 1.3.5

  • Added an entry point in the parser for statements, and an instance Parseable Stmt to go with it.

  • Ensured that .Annotated exports all relevant parseXXX(WithYYY) functions.

1.3.3 --> 1.3.4

  • Operator fixities are now resolved in patterns.

1.3.2 --> 1.3.3

  • Fixes a bug where qualified keywords are rejected even if the extension that enables the keyword in question is not turned on.

1.3.0 --> 1.3.2

(Let's forget 1.3.1 ever existed.)

  • Fix a bug where declarations of infix operators were not properly merged as FunBinds.