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

Modulererebase-1.21.2Haskell2010

Text.ParserCombinators.ReadPrec

  • 2 types
  • 15 values
  • Packagererebase-1.21.2
  • Exports17
  • LanguageHaskell2010
  • LicenceMIT
  • SourceReadPrec.hs
newtypenewtype ReadPrec a
#
Instances7Monad, Functor, MonadFail, Applicative, Alternative, MonadPlus, …
  • Monad ReadPrecDefined in ghc-internal-9.1003.0 · GHC.Internal.Text.ParserCombinators.ReadPrec
  • Functor ReadPrecDefined in ghc-internal-9.1003.0 · GHC.Internal.Text.ParserCombinators.ReadPrec
  • MonadFail ReadPrecDefined in ghc-internal-9.1003.0 · GHC.Internal.Text.ParserCombinators.ReadPrec
  • Applicative ReadPrecDefined in ghc-internal-9.1003.0 · GHC.Internal.Text.ParserCombinators.ReadPrec
  • Alternative ReadPrecDefined in ghc-internal-9.1003.0 · GHC.Internal.Text.ParserCombinators.ReadPrec
  • MonadPlus ReadPrecDefined in ghc-internal-9.1003.0 · GHC.Internal.Text.ParserCombinators.ReadPrec
  • Invariant ReadPrecDefined in invariant-0.6.4 · Data.Functor.Invariant
valueget :: ReadPrec Char
#

Consumes and returns the next character. Fails if there is no input left.

valueprec :: Prec -> ReadPrec a -> ReadPrec a
#

(prec n p) checks whether the precedence context is less than or equal to n, and

  • if not, fails

  • if so, parses p in context n.

valuelook :: ReadPrec String
#

Look-ahead: returns the part of the input that is left, without consuming it.

value(<++) :: ReadPrec a -> ReadPrec a -> ReadPrec a
#

Local, exclusive, left-biased choice: If left parser locally produces any result at all, then right parser is not used.