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

[ bsd3, library, parsing ] [ Propose Tags ]
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 Wed Feb 27 23:36:52 UTC 2013
Distributions NixOS:
Downloads 1515 total (10 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI

[Skip to Readme]




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.