Skip to content

Releases: purescript-contrib/purescript-parsing

v10.2.0

30 Nov 14:48
Compare
Choose a tag to compare

What's Changed

Full Changelog: v10.1.0...v10.2.0

v10.1.0

10 Nov 10:02
Compare
Choose a tag to compare

New features:

Other improvements:

v10.0.0

10 Nov 10:00
Compare
Choose a tag to compare

Bugfixes:

  • consumeWith doesn't consume if position does not advance (#201 by @jamesdbrock)

    This will effect parsers:

    • rest
    • string
    • takeN
    • regex
    • whiteSpace
    • skipSpaces
  • number should parse scientific notation when exponent does not contain a decimal (#204 by @MaybeJustJames)

v9.0.0

28 Apr 00:03
b5a017e
Compare
Choose a tag to compare

Breaking changes:

  • Update project and deps to PureScript v0.15.0 (#160 by @JordanMartinez)

  • Drop deprecated MonadZero instance (#160 by @JordanMartinez)

  • New optimized internals. ParserT now has a more efficient representation,
    resulting in (up to) 20x performance improvement. In addition to the performance,
    all parser execution is always stack-safe, even monadically, obviating the need
    to run parsers with Trampoline as the base Monad or to explicitly use MonadRec.

    Code that was parametric over the underlying Monad no longer needs to propagate a
    Monad constraint.

    Code that constructs parsers via the underlying representation will need to be updated,
    but otherwise the interface is unchanged and parsers should just enjoy the speed boost.

    (#154 by @natefaubion)

  • Make <??> right-associative (#164 by @JordanMartinez)

  • Drop <?> and <~?> prec from 3 to 4 (#163, #164 by @JordanMartinez)

    <|> was made right associative. Decreasing these two operators
    prevents a compiler error (i.e. MixedAssociativityError)
    without causing issues with <$>.

  • Rename module prefix from Text.Parsing.Parser to Parsing (#169 by @jamesdbrock)

  • Replace the regex parser. (#170 by @jamesdbrock)

  • Reorganize Combinators for #154 (#182 by @jamesdbrock)

  • Add the index field to Position. (#171 by @jamesdbrock)

  • Move the parsers

    • whiteSpace
    • skipSpaces
    • oneOf
    • oneOfCodePoints
    • noneOf
    • noneOfCodePoints
      from Parsing.String to Parsing.String.Basic. (#183 by @jamesdbrock)
  • Change MonadState instance (#187 by jamesdbrock)

    Users who stack a ParserT on a StateT base monad will call the MonadState members directly like get instead of needing to do lift <<< get.

    To get the ParserT internal state, call getParserT instead of get.

New features:

Bugfixes:

  • Improve correctness and speed of number and intDecimal. (#189 by @jamesdbrock)

Other improvements:

v7.0.0

06 Oct 06:57
Compare
Choose a tag to compare

What's Changed

New package maintainers: @jamesdbrock @robertdp

Full Changelog: v6.0.2...v7.0.0

Unicode correctness by @jamesdbrock in #119

Correctly handle UTF-16 surrogate pairs in Strings. Fundamentally, we change the way we consume the next input character from Data.String.CodeUnits.uncons to Data.String.CodePoints.uncons.

Non-breaking changes

Add primitive parsers anyCodePoint and satisfyCodePoint for parsing CodePoints.

Add the match combinator.

Breaking changes

Move updatePosString to the Text.Parsing.Parser.String module and don't export it.

Change the definition of whiteSpace and skipSpaces toData.CodePoint.Unicode.isSpace.

To make this library handle Unicode correctly, it is necessary to either alter the StringLike class or delete it. We decided to delete it. The String module will now operate only on inputs of the concrete String type.

Breaking changes which won’t be caught by the compiler

anyChar will no longer always succeed. It will only succeed on a Basic Multilingual Plane character. The new parser anyCodePoint will always succeed.

We keep the Char parsers for backward compatibility. We also keep the Char parsers for ergonomic reasons. For example the parser char :: forall m. Monad m => Char -> ParserT String m Char. This parser is usually called with a literal like char 'a'. It would be annoying to call this parser with char (codePointFromChar 'a').

Benchmarks

A benchmark suite was added to this package, and the benchmarks show no performance difference in this release.

v6.0.2

09 Jun 22:39
d085e37
Compare
Choose a tag to compare

Bugfixes:

v6.0.1

21 Apr 03:24
Compare
Choose a tag to compare

Other improvements:

  • Removed unused names found by v0.14.1 PureScript release (#112 by @JordanMartinez)
  • Installed dependencies directly imported into source code that were previously installed transitively (#112 by @JordanMartinez)

v6.0.0

26 Feb 20:10
97d528a
Compare
Choose a tag to compare

Breaking changes:

  • Improved performance of string and update StringLike to have stripPrefix as a class member instead of indexOf (#93)
  • Non-empty combinators now return NonEmptyList (#102)
  • Added support for PureScript 0.14 and dropped support for all previous versions (#101)

New features:

  • Derived Generic instance of Position (#87)

Bugfixes:

Other improvements:

  • Updated code to use Data.Char.Unicode.hexDigitToInt and Data.Char.Unicode.isDecDigit instead ofData.Char.Unicode.digitToInt and Data.Char.Unicode.isDigit, as those two functions have been deprecated in the unicode library (#103)
  • Changed default branch to main from master
  • Updated to comply with Contributors library guidelines by adding new issue and pull request templates, updating documentation, and migrating to Spago for local development and CI (#98)

v5.1.0

08 Oct 23:30
fc6cd08
Compare
Choose a tag to compare

New features:

Bugfixes:

  • Fixes the token definitions for the Java language parser (@matoruru in #86)

v5.0.3

06 May 20:06
e801a0e
Compare
Choose a tag to compare

Update escape sequences to match parsing in the latest version of the PureScript compiler (@natefaubion) and add a documentation comment about stack safety (@Dretch)