trifecta

A modern parser combinator library with convenient diagnostics

http://github.com/ekmett/trifecta/

LTS Haskell 22.13:2.1.4
Stackage Nightly 2024-03-14:2.1.4
Latest on Hackage:2.1.4

See all snapshots trifecta appears in

BSD-3-Clause licensed by Edward A. Kmett
Maintained by Edward A. Kmett
This version can be pinned in stack with:trifecta-2.1.4@sha256:b0d87f892fa5bdc008cbadbc57bb2de17729da510ff974afac99eeb70844d94e,3525

trifecta

Hackage Build Status

This package provides a parser that focuses on nice diagnostics.

Contact Information

Contributions and bug reports are welcome!

Please feel free to contact me through github or on the #haskell IRC channel on irc.freenode.net.

-Edward Kmett

Changes

2.1.4 [2024.02.07]

  • Allow building with ansi-terminal-1.1.*.

2.1.3 [2023.08.07]

  • Allow building with deepseq-1.5.*.

2.1.2 [2021.11.16]

  • Add an Eq Strand instance.
  • Allow building with hashable-1.4.*.
  • Drop support for pre-8.0 versions of GHC.

2.1.1 [2021.02.18]

  • Allow building with lens-5.*.
  • The build-type has been changed from Custom to Simple. To achieve this, the doctests test suite has been removed in favor of using cabal-docspec to run the doctests.

2.1 [2019.09.06]

  • Support building with base-4.13 (GHC 8.8).
  • Dropped support for GHC < 7.8.
  • Print line numbers in the gutter.
  • Switched to prettyprinter from ansi-wl-pprint
  • Switched from INLINE to INLINABLE to help fight compile time woes while still allowing aggressive inline when you want it.
  • Removed Text.Trifecta.Util.Array. primitive now exists.

2 [2018.07.03]

  • stepParser no longer takes a ByteString.
  • Add a Text.Trifecta.Tutorial module, as well as lots of documentation.
  • Add a foldResult function to Text.Trifecta.Result.
  • Allow building with containers-0.6.

1.7.1.1

  • Support ansi-wl-pprint-0.6.8

1.7.1

  • Support doctest-0.12

1.7

  • Make trifecta forward -Wcompatible:
    • Adding Semigroup instances to correspond to every existing Monoid instance. This requires adding a Semigroup constraint to the Monoid instance for Parser to emulate the Semigroup-Monoid superclass relation that will be present in future versions of GHC.
    • Adding a MonadFail instance for Parser
  • Revamp Setup.hs to use cabal-doctest. This makes it build with Cabal-2.0, and makes the doctests work with cabal new-build and sandboxes.

1.6.2.1

  • Add this changelog to the extra-souce-files in trifecta.cabal so that the changelog will appear on Hackage

1.6.2

  • Enable support for blaze-html-0.9 and blaze-markup-0.8

1.6.1

  • Remove redundant constraints from DeltaParsing’s class methods. This is required for trifecta to build on GHC 8.0.2.

1.6

  • Version bumps to support GHC 8
  • Add line/col numbers to parse results by giving a list of all deltas when errors happen.

1.5.2

  • lens 4.13 support
  • It is a Profunctor
  • Builds clean on GHC 7.10.

1.5.1.3

  • Support newer utf8-string versions and GHC 7.10

1.5.1.2

  • Work around lack of the old preEscapedString export in near-current blaze-markup.

1.5.1.1

  • Work around new exports in blaze.

1.5.1

  • Parsers 0.12.1 support. This removes many Show constraints introduced after 1.4

1.5

  • Properly PVP compliant point release for the parsers changes to properly handle notFollowedBy

1.4.3

  • Accidentally non-PVP compliant point release.

1.4.1

  • GHC 7.8.1 compatibility

1.4

  • Simplified AsResult
  • lens 4.0 compatibility

1.2.1.1

  • Updated array dependency for compatibility with GHC 7.8

1.2.1

  • Bug fix for the Monoid instance in response to issue #15
  • Made the Semigroup instance match the Monoid as well.

1.2

  • Changed the Monoid instance for Parser in response to issue #14
  • Exported MonadErr class for raising Errs