Cabal-3.0.0.0: A framework for packaging Haskell software

LicenseBSD3
Maintainercabal-devel@haskell.org
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Distribution.Fields.LexerMonad

Description

 
Synopsis

Documentation

data LexState #

Constructors

LexState 

Fields

data LexResult a #

Constructors

LexResult !LexState a 

newtype Lex a #

Constructors

Lex 

Fields

Instances
Monad Lex # 
Instance details

Defined in Distribution.Fields.LexerMonad

Methods

(>>=) :: Lex a -> (a -> Lex b) -> Lex b #

(>>) :: Lex a -> Lex b -> Lex b #

return :: a -> Lex a #

fail :: String -> Lex a #

Functor Lex # 
Instance details

Defined in Distribution.Fields.LexerMonad

Methods

fmap :: (a -> b) -> Lex a -> Lex b #

(<$) :: a -> Lex b -> Lex a #

Applicative Lex # 
Instance details

Defined in Distribution.Fields.LexerMonad

Methods

pure :: a -> Lex a #

(<*>) :: Lex (a -> b) -> Lex a -> Lex b #

liftA2 :: (a -> b -> c) -> Lex a -> Lex b -> Lex c #

(*>) :: Lex a -> Lex b -> Lex b #

(<*) :: Lex a -> Lex b -> Lex a #

execLexer :: Lex a -> InputStream -> ([LexWarning], a) #

Execute the given lexer on the supplied input stream.

setPos :: Position -> Lex () #

addWarning :: LexWarningType -> Lex () #

Add warning at the current position