HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulepipes-attoparsec-0.6.0Haskell2010

Pipes.Attoparsec

pipes utilities for incrementally running attoparsec-based parsers.

This module assumes familiarity with pipes-parse, you can learn about it in Pipes.Parse.Tutorial.

  • 1 type
  • 1 class
  • 5 values

Parsing

2 declarations
valueparsed
  1. :: (Monad m, ParserInput a)
  2. => Parser a b

    Attoparsec parser

  3. -> Producer a m r

    Raw input

  4. -> Producer b m (Either (ParsingError, Producer a m r) r)
#

Convert a producer of ParserInput to a producer of parsed values.

This producer returns Right when end-of-input is reached successfully, otherwise it returns a ParsingError and the leftovers including the malformed input that couldn't be parsed. You can use Pipes.Lift.errorP to promote the Either return value to an Control.Monad.Trans.Error.ErrorT monad transformer.

Including input length

Like the functions above, but these also provide information about the length of input consumed in order to fully parse each value.

Utils

1 declaration

Types

2 declarations
datadata ParsingError
#

A parsing error report, as provided by Attoparsec's Fail.

Constructors

Instances5Eq, Data, Read, Show, Exception