Movatterモバイル変換


[0]ホーム

URL:


base-4.12.0.0: Basic libraries

Copyright(c) The University of Glasgow 2002
LicenseBSD-style (see the file libraries/base/LICENSE)
Maintainerlibraries@haskell.org
Stabilityprovisional
Portabilitynon-portable (uses Text.ParserCombinators.ReadP)
Safe HaskellTrustworthy
LanguageHaskell2010

Text.ParserCombinators.ReadPrec

Contents

Description

This library defines parser combinators for precedence parsing.

Synopsis

Documentation

dataReadPrec aSource#

Instances
MonadReadPrecSource#

Since: 2.1

Instance details

Defined inText.ParserCombinators.ReadPrec

FunctorReadPrecSource#

Since: 2.1

Instance details

Defined inText.ParserCombinators.ReadPrec

Methods

fmap :: (a -> b) ->ReadPrec a ->ReadPrec bSource#

(<$) :: a ->ReadPrec b ->ReadPrec aSource#

MonadFailReadPrecSource#

Since: 4.9.0.0

Instance details

Defined inText.ParserCombinators.ReadPrec

ApplicativeReadPrecSource#

Since: 4.6.0.0

Instance details

Defined inText.ParserCombinators.ReadPrec

MonadPlusReadPrecSource#

Since: 2.1

Instance details

Defined inText.ParserCombinators.ReadPrec

AlternativeReadPrecSource#

Since: 4.6.0.0

Instance details

Defined inText.ParserCombinators.ReadPrec

Precedences

typePrec =IntSource#

minPrec ::PrecSource#

Precedence operations

lift ::ReadP a ->ReadPrec aSource#

Lift a precedence-insensitiveReadP to aReadPrec.

prec ::Prec ->ReadPrec a ->ReadPrec aSource#

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

  • if not, fails
  • if so, parsesp in contextn.

step ::ReadPrec a ->ReadPrec aSource#

Increases the precedence context by one.

reset ::ReadPrec a ->ReadPrec aSource#

Resets the precedence context to zero.

Other operations

All are based directly on their similarly-namedReadP counterparts.

get ::ReadPrecCharSource#

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

look ::ReadPrecStringSource#

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

(+++) ::ReadPrec a ->ReadPrec a ->ReadPrec aSource#

Symmetric choice.

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

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

pfail ::ReadPrec aSource#

Always fails.

choice :: [ReadPrec a] ->ReadPrec aSource#

Combines all parsers in the specified list.

Converters

readPrec_to_P ::ReadPrec a ->Int ->ReadP aSource#

readP_to_Prec :: (Int ->ReadP a) ->ReadPrec aSource#

readPrec_to_S ::ReadPrec a ->Int ->ReadS aSource#

readS_to_Prec :: (Int ->ReadS a) ->ReadPrec aSource#

Produced byHaddock version 2.20.0


[8]ページ先頭

©2009-2025 Movatter.jp