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

Modulepolyparse-1.13Haskell98

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
  • Exports35
  • LanguageHaskell98
  • 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 · Text.ParserCombinators.HuttonMeijer
  • Functor ParserDefined in polyparse-1.13 · Text.ParserCombinators.HuttonMeijer
  • MonadFail ParserDefined in polyparse-1.13 · Text.ParserCombinators.HuttonMeijer
  • Applicative ParserDefined in polyparse-1.13 · Text.ParserCombinators.HuttonMeijer
  • Alternative ParserDefined in polyparse-1.13 · Text.ParserCombinators.HuttonMeijer
  • MonadPlus ParserDefined in polyparse-1.13 · Text.ParserCombinators.HuttonMeijer