Releases: purescript-contrib/purescript-parsing
v10.2.0
What's Changed
- README Recursion by @jamesdbrock in #216
- takeWhile by @jamesdbrock in #218
Full Changelog: v10.1.0...v10.2.0
v10.1.0
New features:
- add
MonadAsk
andMonadReader
instances (#208 by @bentongxyz) - Add
Parsing.String.parseErrorHuman
(#209 by @jamesdbrock) - Add
liftMaybe
,liftEither
,liftExceptT
(#212 by @jamesdbrock)
Other improvements:
- Better error messages for
manyIndex
(#211 by @jamesdbrock) - Docs for
region
(#213 by @jamesdbrock) - README Recursion (#214 by @jamesdbrock)
v10.0.0
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
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 withTrampoline
as the base Monad or to explicitly useMonadRec
.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
toParsing
(#169 by @jamesdbrock) -
Replace the
regex
parser. (#170 by @jamesdbrock) -
Reorganize Combinators for #154 (#182 by @jamesdbrock)
-
Add the
index
field toPosition
. (#171 by @jamesdbrock) -
Move the parsers
whiteSpace
skipSpaces
oneOf
oneOfCodePoints
noneOf
noneOfCodePoints
fromParsing.String
toParsing.String.Basic
. (#183 by @jamesdbrock)
-
Change MonadState instance (#187 by jamesdbrock)
Users who stack a
ParserT
on aStateT
base monad will call theMonadState
members directly likeget
instead of needing to dolift <<< get
.To get the
ParserT
internal state, callgetParserT
instead ofget
.
New features:
- Add the
anyTill
primitiveString
combinator. (#186 by @jamesdbrock) - Add the
Parsing.String.Replace
module, copied from
https://github.com/jamesdbrock/purescript-parsing-replace (#188 by @jamesdbrock)
Bugfixes:
- Improve correctness and speed of
number
andintDecimal
. (#189 by @jamesdbrock)
Other improvements:
- Drop
math
dependency; update imports (#167 by @JordanMartinez)
v7.0.0
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 String
s. 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 CodePoint
s.
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
v6.0.1
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
Breaking changes:
- Improved performance of
string
and updateStringLike
to havestripPrefix
as a class member instead ofindexOf
(#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
andData.Char.Unicode.isDecDigit
instead ofData.Char.Unicode.digitToInt
andData.Char.Unicode.isDigit
, as those two functions have been deprecated in theunicode
library (#103) - Changed default branch to
main
frommaster
- 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
New features:
- Adds a
region
function similar to the function of the same name in megaparsec which specifies how to processParseError
s which occur inside the indicated region (@jamesdbrock in #97 and #96).
Bugfixes:
v5.0.3
Update escape sequences to match parsing in the latest version of the PureScript compiler (@natefaubion) and add a documentation comment about stack safety (@Dretch)