parsec-permutation: Applicative permutation parser for Parsec intended as a replacement for Text.Parsec.Perm.

[ bsd3, library, parsing ] [ Propose Tags ]

[Skip to Readme]
Versions [RSS] [faq],,
Dependencies base (==4.*), parsec (>=3) [details]
License BSD-3-Clause
Copyright Bitbase, LLC
Author Samuel Hoffstaetter
Category Parsing
Source repo head: git clone
Uploaded by SamuelHoffstaetter at 2013-03-08T00:21:59Z
Distributions NixOS:
Downloads 2882 total (40 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs uploaded by user
Build status unknown [no reports yet]




Maintainer's Corner

For package maintainers and hackage trustees


Readme for parsec-permutation-

[back to package description]
Text.Parsec.Permutation is a permutation parser for parsec intended as
a generalized replacement for Text.Parsec.Perm in parsec.

Example usage:

  > import Text.Parsec.Permutation
  > fooParser :: ParsecT s u m a -> ParsecT s u m [a]
  > fooParser = runPermParser $
  >                 (,,) <$> oncePerm (char 'A')
  >                      <*> manyPerm (char 'B')
  >                      <*> optionMaybePerm (char 'C' >> char 'D')

This parser will return ('A', "BBB", Just 'D') when parsing for example
the strings "BCDABB", "CDBBAB", etc.