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

[ bsd3, library, parsing ] [ Propose Tags ]




Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS],,
Dependencies base (>=4 && <5), 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:
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 3544 total (31 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

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.