HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

Modulepolyparse-1.13.1Haskell2010

Text.ParserCombinators.HuttonMeijer

A LIBRARY OF MONADIC PARSER COMBINATORS

29th July 1996

Graham Hutton Erik Meijer University of Nottingham University of Utrecht

This Haskell script defines a library of parser combinators, and is taken from sections 1-6 of our article "Monadic Parser Combinators". Some changes to the library have been made in the move from Gofer to Haskell:

  • Do notation is used in place of monad comprehension notation;

  • The parser datatype is defined using "newtype", to avoid the overhead of tagging and untagging parsers with the P constructor.

  • 1 type
  • 34 values
  • Packagepolyparse-1.13.1
  • Exports35
  • LanguageHaskell2010
  • LicenceLicenseRef-LGPL
  • SourceHuttonMeijer.hs
newtypenewtype Parser a
#

The parser monad

Constructors

  • P ([Token] -> [(a, [Token])])
Instances6Monad, Functor, MonadFail, Applicative, Alternative, MonadPlus
  • Monad ParserDefined in polyparse-1.13.1 · Text.ParserCombinators.HuttonMeijer
  • Functor ParserDefined in polyparse-1.13.1 · Text.ParserCombinators.HuttonMeijer
  • MonadFail ParserDefined in polyparse-1.13.1 · Text.ParserCombinators.HuttonMeijer
  • Applicative ParserDefined in polyparse-1.13.1 · Text.ParserCombinators.HuttonMeijer
  • Alternative ParserDefined in polyparse-1.13.1 · Text.ParserCombinators.HuttonMeijer
  • MonadPlus ParserDefined in polyparse-1.13.1 · Text.ParserCombinators.HuttonMeijer