Simon Hengel
075477b765
Add Text.Megaparsec.Error.errorBundlePrettyForGhcPreProcessors
2024-11-19 16:58:43 +01:00
Mark Karpov
8d1f5cc35e
Use better implementations for many and some by default
2024-09-28 21:20:40 +02:00
kei
ca56748247
chore: fix typo in mzero
docs
2024-09-11 20:20:12 +02:00
Szumi Xie
c8c9fb0eb1
Inline applicative operators
2024-08-08 14:09:19 +02:00
Mark Karpov
1160ac8566
Implement correct handling of wide Unicode characters
2024-07-11 22:39:15 +02:00
Jannis
6d07432bd6
Expand elem/notElem to allow fusion
2024-05-16 12:19:53 +02:00
Lev Dvorkin
53377ef1d1
Add initState and initPosState to Text.Megaparsec.State
2023-08-30 21:02:22 +02:00
olafklinke
2e4970a3ee
Add a MonadWriter instance for ParsecT
2023-07-07 19:01:05 +02:00
Mark Karpov
9aaba7dedb
Modernize GHC flags
2023-06-22 14:50:15 +02:00
Mark Karpov
f380700ec6
Remove not strictly necessary Monad m constraints introduced in #514
2023-06-16 22:06:56 +02:00
Brandon Chinn
cf5d3472e5
Add mkParsec as a new method of MonadParsec
...
This can be used to construct “new primitives” with arbitrary behavior at
the expense of having to dive into Megaparsec's internals.
2023-06-11 19:11:25 +02:00
Lev Dvorkin
15fb623b59
Preserve hints in MTL instances
...
Extend the `Ok` data constructor of `Result` to include hints in order to
avoid losing information due to invoking `runParsecT` followed by `mkPT`.
2023-06-06 20:01:08 +02:00
Lev Dvorkin
36f02e8aeb
Make dbg also print hints
2023-06-05 21:53:25 +02:00
dependabot[bot]
816f7f54e6
Bump mrkkrp/ormolu-action from 10 to 12
...
Bumps [mrkkrp/ormolu-action](https://github.com/mrkkrp/ormolu-action ) from 10 to 12.
- [Release notes](https://github.com/mrkkrp/ormolu-action/releases )
- [Changelog](https://github.com/haskell-actions/run-ormolu/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mrkkrp/ormolu-action/compare/v10...v12 )
---
updated-dependencies:
- dependency-name: mrkkrp/ormolu-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-05-24 22:34:53 +02:00
Mark Karpov
53d0c64ba1
Render tabs correctly when error messages are rendered
2023-05-18 19:16:31 +02:00
Mark Karpov
3496aaa34f
Point out that 'parse' and 'runParser' are the same
2023-03-23 18:52:34 +01:00
dependabot[bot]
69d4c46e36
Bump mrkkrp/ormolu-action from 9 to 10
...
Bumps [mrkkrp/ormolu-action](https://github.com/mrkkrp/ormolu-action ) from 9 to 10.
- [Release notes](https://github.com/mrkkrp/ormolu-action/releases )
- [Changelog](https://github.com/mrkkrp/ormolu-action/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mrkkrp/ormolu-action/compare/v9...v10 )
---
updated-dependencies:
- dependency-name: mrkkrp/ormolu-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-02-13 11:35:23 +01:00
Frederik Ramcke
72e6dfe1a8
Add control over sharing of the input stream
2022-11-27 18:56:58 +01:00
Lev135
1401288a74
Add the MonadParsecDbg class
2022-11-24 20:47:03 +01:00
Mark Karpov
7162603e18
Make takeP return the empty chunk of the input stream when n < 0
2022-11-10 22:30:23 +01:00
Mark Karpov
51d3646fef
Make label override all hints instead of only the last one
2022-10-21 21:46:35 +02:00
Mark Karpov
7a4e3b3af4
Adjust the docs of indentBlock
...
It appears that the old wording is excessively strict for no good reason.
2022-10-21 20:43:03 +02:00
Mark Karpov
889c9f3446
Fix a typo
2022-10-21 20:26:14 +02:00
Tom Ellis
a0efaab6eb
Make St SourcePos strict and UNPACKed
...
Fixes https://github.com/mrkkrp/megaparsec/issues/486
2022-09-01 14:26:18 +02:00
Mark Karpov
fc5d860d68
Test with GHC 9.2.4 and GHC 9.4.1 + misc updates
2022-08-18 11:42:58 +02:00
Mark Karpov
2a46074430
Numeric parsers: warn about absence of range checks
2022-05-29 17:45:04 +02:00
Mark Karpov
7d6b82642d
Use Ormolu action v6 (Ormolu 0.5.0.0)
2022-05-12 15:08:58 +02:00
Simon Jakobi
13c62e41fc
Support mtl-2.3
2022-05-09 09:58:16 +02:00
Mark Karpov
d5556790fa
Test with 3 latest versions of GHC, update Ormolu
2021-12-04 13:53:48 +01:00
Anton-Latukha
9a71a45399
Mention the performance advantages of takeWhile1P in its docs
2021-11-16 23:42:38 +01:00
Ben Orchard
064edbddd6
Add binary-format number parsers
2021-08-15 19:59:16 +02:00
Mark Karpov
925813d066
Add Safe annotation to the Text.Megaparsec.Error boot file
2021-08-14 19:06:57 +02:00
Anton-Latukha
9d92f5a490
Improve the docs for Text.Megaparsec.Class.token
2021-08-11 18:35:09 +02:00
Mark Karpov
5d4e3e7cfd
Add a debugging helper that doesn't require a Show
instance
2021-07-14 21:29:05 +02:00
Mark Karpov
e6fbc3d822
Fix CI (Trustworthy / Safe)
2021-07-14 21:01:09 +02:00
Mark Karpov
ed6fdf71d9
Improve the writing
2021-04-25 16:03:52 +02:00
Mark Karpov
c5d6bb362c
Test with GHC 9.0.1 and 8.10.4
2021-03-01 01:18:16 +01:00
Dennis Gosnell
7dda58a2f7
Fix Haddock link to Text.Megaparsec.Char.space1
2021-01-08 13:30:45 +01:00
Artem Pelenitsyn
55063c15ed
typo in docs
2020-12-20 13:36:29 +01:00
Mark Karpov
040a1be79e
Add a performance note to the dos of ‘satisfy’
...
Close #434 .
2020-12-14 12:08:57 +01:00
Mark Karpov
7391c09bfb
Mention that the ‘MonadPlus’ instance is unlawful
...
Close #430 , close #429 .
2020-10-30 12:06:20 +01:00
mlugg
ccf314b0b9
Add Safe Haskell support
...
Remove dependence on GeneralizedNewtypeDeriving and add Safe Haskell
extensions to every file.
2020-10-17 18:53:15 +02:00
Mark Karpov
1f574c42ea
Fix a typo in the docs for ‘hspace1’
...
Close #424
2020-09-26 16:55:51 +02:00
1computer1
34b34c3d93
Decouple the error reporting-related methods from ‘Stream’
...
Split the ‘Stream’ type class. The methods ‘showTokens’ and ‘tokensLength’
have been put into a separate type class ‘VisualStream’, while ‘reachOffset’
and ‘reachOffsetNoLine’ are now in ‘TraversableStream’. This should make
defining ‘Stream’ instances for custom streams easier.
Defined ‘Stream’ instances for lists and ‘Seq’s.
2020-09-02 19:50:45 +02:00
Mark Karpov
e42f42a943
Re-format with Ormolu 0.1.2.0
2020-07-17 12:13:07 +02:00
Mark Karpov
46f276a0cc
Add ‘hspace’ and ‘hspace1’ functions
...
These functions are slightly more specific versions of the existing ‘space’
functions. They accept only “horizontal whitespace”.
2020-05-10 22:53:16 +02:00
Mark Karpov
99e640ec39
Format the source code with Ormolu
2020-04-23 22:05:36 +02:00
Jonathan Curran
4c8ea278e3
Update comment to reflect updated function name
...
`anyChar` was renamed to `anySingle` in 7.0.0 - this simply updates the outdated comment
2019-11-28 19:32:11 +01:00
mrkkrp
20811826ca
Update the links to the tutorial
2019-11-22 23:16:51 +01:00
mrkkrp
31b917b129
Allow registration of delayed parse errors
...
Megaparsec now supports registration of “delayed” parse errors. On lower
level we added a new field called ‘stateParseErrors’ to the ‘State’ record.
The type also had to change from ‘State s’ to ‘State s e’. This field
contains the list of registered ‘ParseErrors’ that do not end parsing
immediately but still will cause failure in the end if the list is not
empty. Users are expected to register parse errors using the three
functions: ‘registerParseError’, ‘registerFailure’, and
‘registerFancyFailure’. These functions are analogous to those without the
‘register’ prefix, except that they have “delayed” effect.
2019-11-07 12:48:56 +01:00