polyparse-1.13: A variety of alternative parser combinator libraries.
Safe HaskellNone
LanguageHaskell98

Text.ParserCombinators.Poly.StateLazy

Synopsis

The Parser datatype

newtype Parser s t a Source #

The only differences between a State and a StateLazy parser are the instance of Applicative, and the type (and implementation) of runParser. We therefore need to newtype the original Parser type, to allow it to have a different instance.

Constructors

P (Parser s t a) 

Instances

Instances details
Alternative (Parser s t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.StateLazy

Methods

empty :: Parser s t a #

(<|>) :: Parser s t a -> Parser s t a -> Parser s t a #

some :: Parser s t a -> Parser s t [a] #

many :: Parser s t a -> Parser s t [a] #

Applicative (Parser s t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.StateLazy

Methods

pure :: a -> Parser s t a #

(<*>) :: Parser s t (a -> b) -> Parser s t a -> Parser s t b #

liftA2 :: (a -> b -> c) -> Parser s t a -> Parser s t b -> Parser s t c #

(*>) :: Parser s t a -> Parser s t b -> Parser s t b #

(<*) :: Parser s t a -> Parser s t b -> Parser s t a #

Functor (Parser s t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.StateLazy

Methods

fmap :: (a -> b) -> Parser s t a -> Parser s t b

(<$) :: a -> Parser s t b -> Parser s t a #

Monad (Parser s t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.StateLazy

Methods

(>>=) :: Parser s t a -> (a -> Parser s t b) -> Parser s t b

(>>) :: Parser s t a -> Parser s t b -> Parser s t b

return :: a -> Parser s t a

MonadFail (Parser s t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.StateLazy

Methods

fail :: String -> Parser s t a

Commitment (Parser s t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.StateLazy

Methods

commit :: Parser s t a -> Parser s t a Source #

adjustErr :: Parser s t a -> (String -> String) -> Parser s t a Source #

oneOf' :: [(String, Parser s t a)] -> Parser s t a Source #

PolyParse (Parser s t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.StateLazy

data Result z a Source #

A return type like Either, that distinguishes not only between right and wrong answers, but also has commitment, so that a failure cannot be undone. This should only be used for writing very primitive parsers - really it is an internal detail of the library. The z type is the remaining unconsumed input.

Constructors

Success z a 
Failure z String 
Committed (Result z a) 

Instances

Instances details
Functor (Result z) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.Result

Methods

fmap :: (a -> b) -> Result z a -> Result z b

(<$) :: a -> Result z b -> Result z a #

runParser :: Parser s t a -> s -> [t] -> (a, s, [t]) Source #

Apply a parser to an input token sequence.

Basic parsers

next :: Parser s t t Source #

Simply return the next token in the input tokenstream.

eof :: Parser s t () Source #

Succeed if the end of file/input has been reached, fail otherwise.

satisfy :: (t -> Bool) -> Parser s t t Source #

Return the next token if it satisfies the given predicate.

onFail :: Parser s t a -> Parser s t a -> Parser s t a Source #

p onFail q means parse p, unless p fails, in which case parse q instead. Can be chained together to give multiple attempts to parse something. (Note that q could itself be a failing parser, e.g. to change the error message from that defined in p to something different.) However, a severe failure in p cannot be ignored.

manyFinally :: Parser s t a -> Parser s t z -> Parser s t [a] Source #

State-handling

stUpdate :: (s -> s) -> Parser s t () Source #

Update the internal state.

stQuery :: (s -> a) -> Parser s t a Source #

Query the internal state.

stGet :: Parser s t s Source #

Deliver the entire internal state.

Re-parsing

reparse :: [t] -> Parser s t () Source #

Push some tokens back onto the front of the input stream and reparse. This is useful e.g. for recursively expanding macros. When the user-parser recognises a macro use, it can lookup the macro expansion from the parse state, lex it, and then stuff the lexed expansion back down into the parser.

Re-export all more general combinators

many1 :: PolyParse p => p a -> p [a] Source #

Parse a non-empty list of items.

bracket :: PolyParse p => p bra -> p ket -> p a -> p a Source #

Parse a bracketed item, discarding the brackets. If everything matches except the closing bracket, the whole parse fails soft, which can give less-than-satisfying error messages. If you want better error messages, try calling with e.g. bracket open (commit close) item

class Commitment (p :: Type -> Type) where Source #

The Commitment class is an abstraction over all the current concrete representations of monadic/applicative parser combinators in this package. The common feature is two-level error-handling. Some primitives must be implemented specific to each parser type (e.g. depending on whether the parser has a running state, or whether it is lazy). But given those primitives, large numbers of combinators do not depend any further on the internal structure of the particular parser.

Methods

commit :: p a -> p a Source #

Commit is a way of raising the severity of any errors found within its argument. Used in the middle of a parser definition, it means that any operations prior to commitment fail softly, but after commitment, they fail hard.

adjustErr :: p a -> (String -> String) -> p a Source #

p adjustErr f applies the transformation f to any error message generated in p, having no effect if p succeeds.

oneOf' :: [(String, p a)] -> p a Source #

Parse the first alternative that succeeds, but if none succeed, report only the severe errors, and if none of those, then report all the soft errors.

Instances

Instances details
Commitment Parser Source # 
Instance details

Defined in Text.ParserCombinators.Poly.ByteString

Methods

commit :: Parser a -> Parser a Source #

adjustErr :: Parser a -> (String -> String) -> Parser a Source #

oneOf' :: [(String, Parser a)] -> Parser a Source #

Commitment Parser Source # 
Instance details

Defined in Text.ParserCombinators.Poly.ByteStringChar

Methods

commit :: Parser a -> Parser a Source #

adjustErr :: Parser a -> (String -> String) -> Parser a Source #

oneOf' :: [(String, Parser a)] -> Parser a Source #

Commitment Parser Source # 
Instance details

Defined in Text.ParserCombinators.Poly.Text

Methods

commit :: Parser a -> Parser a Source #

adjustErr :: Parser a -> (String -> String) -> Parser a Source #

oneOf' :: [(String, Parser a)] -> Parser a Source #

Commitment (Parser t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.Lazy

Methods

commit :: Parser t a -> Parser t a Source #

adjustErr :: Parser t a -> (String -> String) -> Parser t a Source #

oneOf' :: [(String, Parser t a)] -> Parser t a Source #

Commitment (Parser t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.Lex

Methods

commit :: Parser t a -> Parser t a Source #

adjustErr :: Parser t a -> (String -> String) -> Parser t a Source #

oneOf' :: [(String, Parser t a)] -> Parser t a Source #

Commitment (Parser t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.Parser

Methods

commit :: Parser t a -> Parser t a Source #

adjustErr :: Parser t a -> (String -> String) -> Parser t a Source #

oneOf' :: [(String, Parser t a)] -> Parser t a Source #

Commitment (Parser s) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.StateText

Methods

commit :: Parser s a -> Parser s a Source #

adjustErr :: Parser s a -> (String -> String) -> Parser s a Source #

oneOf' :: [(String, Parser s a)] -> Parser s a Source #

Commitment (Parser s t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.StateLazy

Methods

commit :: Parser s t a -> Parser s t a Source #

adjustErr :: Parser s t a -> (String -> String) -> Parser s t a Source #

oneOf' :: [(String, Parser s t a)] -> Parser s t a Source #

Commitment (Parser s t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.StateParser

Methods

commit :: Parser s t a -> Parser s t a Source #

adjustErr :: Parser s t a -> (String -> String) -> Parser s t a Source #

oneOf' :: [(String, Parser s t a)] -> Parser s t a Source #

class (Functor p, Monad p, MonadFail p, Applicative p, Alternative p, Commitment p) => PolyParse (p :: Type -> Type) Source #

The PolyParse class is an abstraction gathering all of the common features that a two-level error-handling parser requires: the applicative parsing interface, the monadic interface, and commitment.

There are two additional basic combinators that we expect to be implemented afresh for every concrete type, but which (for technical reasons) cannot be class methods. They are next and satisfy.

Instances

Instances details
PolyParse Parser Source # 
Instance details

Defined in Text.ParserCombinators.Poly.ByteString

PolyParse Parser Source # 
Instance details

Defined in Text.ParserCombinators.Poly.ByteStringChar

PolyParse Parser Source # 
Instance details

Defined in Text.ParserCombinators.Poly.Text

PolyParse (Parser t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.Lazy

PolyParse (Parser t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.Lex

PolyParse (Parser t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.Parser

PolyParse (Parser s) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.StateText

PolyParse (Parser s t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.StateLazy

PolyParse (Parser s t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.StateParser

apply :: PolyParse p => p (a -> b) -> p a -> p b infixl 3 Source #

Apply a parsed function to a parsed value. Rather like ordinary function application lifted into parsers.

discard :: PolyParse p => p a -> p b -> p a infixl 3 Source #

x discard y parses both x and y, but discards the result of y. Rather like const lifted into parsers.

failBad :: PolyParse p => String -> p a Source #

When a simple fail is not strong enough, use failBad for emphasis. An emphasised (severe) error cannot be overridden by choice operators.

adjustErrBad :: PolyParse p => p a -> (String -> String) -> p a Source #

adjustErrBad is just like adjustErr except it also raises the severity of the error.

indent :: Int -> String -> String Source #

Helper for formatting error messages: indents all lines by a fixed amount.

oneOf :: PolyParse p => [p a] -> p a Source #

Parse the first alternative in the list that succeeds.

exactly :: PolyParse p => Int -> p a -> p [a] Source #

'exactly n p' parses precisely n items, using the parser p, in sequence.

upto :: PolyParse p => Int -> p a -> p [a] Source #

'upto n p' parses n or fewer items, using the parser p, in sequence.

sepBy :: PolyParse p => p a -> p sep -> p [a] Source #

Parse a list of items separated by discarded junk.

sepBy1 :: PolyParse p => p a -> p sep -> p [a] Source #

Parse a non-empty list of items separated by discarded junk.

bracketSep :: PolyParse p => p bra -> p sep -> p ket -> p a -> p [a] Source #

Parse a list of items, discarding the start, end, and separator items.

manyFinally' :: (PolyParse p, Show a) => p a -> p z -> p [a] Source #

manyFinally' is like manyFinally, except when the terminator parser overlaps with the element parser. In manyFinally e t, the parser t is tried only when parser e fails, whereas in manyFinally' e t, the parser t is always tried first, then parser e only if the terminator is not found. For instance, manyFinally (accept "01") (accept "0") on input "0101010" returns ["01","01","01"], whereas manyFinally' with the same arguments and input returns [].

class Applicative f => Alternative (f :: Type -> Type) where #

Minimal complete definition

empty, (<|>)

Methods

empty :: f a #

(<|>) :: f a -> f a -> f a #

some :: f a -> f [a] #

many :: f a -> f [a] #

Instances

Instances details
Alternative ZipList 
Instance details

Defined in GHC.Internal.Functor.ZipList

Methods

empty :: ZipList a #

(<|>) :: ZipList a -> ZipList a -> ZipList a #

some :: ZipList a -> ZipList [a] #

many :: ZipList a -> ZipList [a] #

Alternative P 
Instance details

Defined in GHC.Internal.Text.ParserCombinators.ReadP

Methods

empty :: P a #

(<|>) :: P a -> P a -> P a #

some :: P a -> P [a] #

many :: P a -> P [a] #

Alternative ReadP 
Instance details

Defined in GHC.Internal.Text.ParserCombinators.ReadP

Methods

empty :: ReadP a #

(<|>) :: ReadP a -> ReadP a -> ReadP a #

some :: ReadP a -> ReadP [a] #

many :: ReadP a -> ReadP [a] #

Alternative IO 
Instance details

Defined in GHC.Internal.Base

Methods

empty :: IO a #

(<|>) :: IO a -> IO a -> IO a #

some :: IO a -> IO [a] #

many :: IO a -> IO [a] #

Alternative Parser Source # 
Instance details

Defined in Text.ParserCombinators.HuttonMeijer

Methods

empty :: Parser a #

(<|>) :: Parser a -> Parser a -> Parser a #

some :: Parser a -> Parser [a] #

many :: Parser a -> Parser [a] #

Alternative Parser Source # 
Instance details

Defined in Text.ParserCombinators.Poly.ByteString

Methods

empty :: Parser a #

(<|>) :: Parser a -> Parser a -> Parser a #

some :: Parser a -> Parser [a] #

many :: Parser a -> Parser [a] #

Alternative Parser Source # 
Instance details

Defined in Text.ParserCombinators.Poly.ByteStringChar

Methods

empty :: Parser a #

(<|>) :: Parser a -> Parser a -> Parser a #

some :: Parser a -> Parser [a] #

many :: Parser a -> Parser [a] #

Alternative Parser Source # 
Instance details

Defined in Text.ParserCombinators.Poly.Text

Methods

empty :: Parser a #

(<|>) :: Parser a -> Parser a -> Parser a #

some :: Parser a -> Parser [a] #

many :: Parser a -> Parser [a] #

Alternative Maybe 
Instance details

Defined in GHC.Internal.Base

Methods

empty :: Maybe a #

(<|>) :: Maybe a -> Maybe a -> Maybe a #

some :: Maybe a -> Maybe [a] #

many :: Maybe a -> Maybe [a] #

Alternative [] 
Instance details

Defined in GHC.Internal.Base

Methods

empty :: [a] #

(<|>) :: [a] -> [a] -> [a] #

some :: [a] -> [[a]] #

many :: [a] -> [[a]] #

MonadPlus m => Alternative (WrappedMonad m) 
Instance details

Defined in Control.Applicative

Methods

empty :: WrappedMonad m a #

(<|>) :: WrappedMonad m a -> WrappedMonad m a -> WrappedMonad m a #

some :: WrappedMonad m a -> WrappedMonad m [a] #

many :: WrappedMonad m a -> WrappedMonad m [a] #

ArrowPlus a => Alternative (ArrowMonad a) 
Instance details

Defined in GHC.Internal.Control.Arrow

Methods

empty :: ArrowMonad a a0 #

(<|>) :: ArrowMonad a a0 -> ArrowMonad a a0 -> ArrowMonad a a0 #

some :: ArrowMonad a a0 -> ArrowMonad a [a0] #

many :: ArrowMonad a a0 -> ArrowMonad a [a0] #

Alternative (Parser t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.Lazy

Methods

empty :: Parser t a #

(<|>) :: Parser t a -> Parser t a -> Parser t a #

some :: Parser t a -> Parser t [a] #

many :: Parser t a -> Parser t [a] #

Alternative (Parser t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.Lex

Methods

empty :: Parser t a #

(<|>) :: Parser t a -> Parser t a -> Parser t a #

some :: Parser t a -> Parser t [a] #

many :: Parser t a -> Parser t [a] #

Alternative (Parser t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.Parser

Methods

empty :: Parser t a #

(<|>) :: Parser t a -> Parser t a -> Parser t a #

some :: Parser t a -> Parser t [a] #

many :: Parser t a -> Parser t [a] #

Alternative (Parser s) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.StateText

Methods

empty :: Parser s a #

(<|>) :: Parser s a -> Parser s a -> Parser s a #

some :: Parser s a -> Parser s [a] #

many :: Parser s a -> Parser s [a] #

(ArrowZero a, ArrowPlus a) => Alternative (WrappedArrow a b) 
Instance details

Defined in Control.Applicative

Methods

empty :: WrappedArrow a b a0 #

(<|>) :: WrappedArrow a b a0 -> WrappedArrow a b a0 -> WrappedArrow a b a0 #

some :: WrappedArrow a b a0 -> WrappedArrow a b [a0] #

many :: WrappedArrow a b a0 -> WrappedArrow a b [a0] #

Alternative m => Alternative (Kleisli m a) 
Instance details

Defined in GHC.Internal.Control.Arrow

Methods

empty :: Kleisli m a a0 #

(<|>) :: Kleisli m a a0 -> Kleisli m a a0 -> Kleisli m a a0 #

some :: Kleisli m a a0 -> Kleisli m a [a0] #

many :: Kleisli m a a0 -> Kleisli m a [a0] #

Alternative (Parser s t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.StateLazy

Methods

empty :: Parser s t a #

(<|>) :: Parser s t a -> Parser s t a -> Parser s t a #

some :: Parser s t a -> Parser s t [a] #

many :: Parser s t a -> Parser s t [a] #

Alternative (Parser s t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.StateParser

Methods

empty :: Parser s t a #

(<|>) :: Parser s t a -> Parser s t a -> Parser s t a #

some :: Parser s t a -> Parser s t [a] #

many :: Parser s t a -> Parser s t [a] #

(Alternative f, Alternative g) => Alternative (Product f g) 
Instance details

Defined in Data.Functor.Product

Methods

empty :: Product f g a #

(<|>) :: Product f g a -> Product f g a -> Product f g a #

some :: Product f g a -> Product f g [a] #

many :: Product f g a -> Product f g [a] #

Alternative (Parser s t e) Source # 
Instance details

Defined in Text.ParserCombinators.HuttonMeijerWallace

Methods

empty :: Parser s t e a #

(<|>) :: Parser s t e a -> Parser s t e a -> Parser s t e a #

some :: Parser s t e a -> Parser s t e [a] #

many :: Parser s t e a -> Parser s t e [a] #

(Alternative f, Applicative g) => Alternative (Compose f g) 
Instance details

Defined in Data.Functor.Compose

Methods

empty :: Compose f g a #

(<|>) :: Compose f g a -> Compose f g a -> Compose f g a #

some :: Compose f g a -> Compose f g [a] #

many :: Compose f g a -> Compose f g [a] #

class Functor f => Applicative (f :: Type -> Type) where #

Minimal complete definition

pure, ((<*>) | liftA2)

Methods

pure :: a -> f a #

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

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

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

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

Instances

Instances details
Applicative Complex 
Instance details

Defined in Data.Complex

Methods

pure :: a -> Complex a #

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

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

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

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

Applicative First 
Instance details

Defined in Data.Semigroup

Methods

pure :: a -> First a #

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

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

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

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

Applicative Last 
Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Last a #

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

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

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

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

Applicative Max 
Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Max a #

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

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

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

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

Applicative Min 
Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Min a #

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

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

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

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

Applicative Put 
Instance details

Defined in Data.ByteString.Builder.Internal

Methods

pure :: a -> Put a #

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

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

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

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

Applicative NonEmpty 
Instance details

Defined in GHC.Internal.Base

Methods

pure :: a -> NonEmpty a #

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

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

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

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

Applicative ZipList 
Instance details

Defined in GHC.Internal.Functor.ZipList

Methods

pure :: a -> ZipList a #

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

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

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

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

Applicative P 
Instance details

Defined in GHC.Internal.Text.ParserCombinators.ReadP

Methods

pure :: a -> P a #

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

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

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

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

Applicative ReadP 
Instance details

Defined in GHC.Internal.Text.ParserCombinators.ReadP

Methods

pure :: a -> ReadP a #

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

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

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

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

Applicative IO 
Instance details

Defined in GHC.Internal.Base

Methods

pure :: a -> IO a #

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

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

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

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

Applicative Parser Source # 
Instance details

Defined in Text.ParserCombinators.HuttonMeijer

Methods

pure :: a -> Parser a #

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

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

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

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

Applicative Parser Source # 
Instance details

Defined in Text.ParserCombinators.Poly.ByteString

Methods

pure :: a -> Parser a #

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

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

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

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

Applicative Parser Source # 
Instance details

Defined in Text.ParserCombinators.Poly.ByteStringChar

Methods

pure :: a -> Parser a #

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

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

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

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

Applicative Parser Source # 
Instance details

Defined in Text.ParserCombinators.Poly.Text

Methods

pure :: a -> Parser a #

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

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

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

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

Applicative Maybe 
Instance details

Defined in GHC.Internal.Base

Methods

pure :: a -> Maybe a #

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

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

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

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

Applicative Solo 
Instance details

Defined in GHC.Internal.Base

Methods

pure :: a -> Solo a #

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

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

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

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

Applicative [] 
Instance details

Defined in GHC.Internal.Base

Methods

pure :: a -> [a] #

(<*>) :: [a -> b] -> [a] -> [b] #

liftA2 :: (a -> b -> c) -> [a] -> [b] -> [c] #

(*>) :: [a] -> [b] -> [b] #

(<*) :: [a] -> [b] -> [a] #

Monad m => Applicative (WrappedMonad m) 
Instance details

Defined in Control.Applicative

Methods

pure :: a -> WrappedMonad m a #

(<*>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b #

liftA2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c #

(*>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b #

(<*) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a #

Arrow a => Applicative (ArrowMonad a) 
Instance details

Defined in GHC.Internal.Control.Arrow

Methods

pure :: a0 -> ArrowMonad a a0 #

(<*>) :: ArrowMonad a (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b #

liftA2 :: (a0 -> b -> c) -> ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a c #

(*>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b #

(<*) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a a0 #

Applicative (Either e) 
Instance details

Defined in GHC.Internal.Data.Either

Methods

pure :: a -> Either e a #

(<*>) :: Either e (a -> b) -> Either e a -> Either e b #

liftA2 :: (a -> b -> c) -> Either e a -> Either e b -> Either e c #

(*>) :: Either e a -> Either e b -> Either e b #

(<*) :: Either e a -> Either e b -> Either e a #

Applicative (Parser t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.Lazy

Methods

pure :: a -> Parser t a #

(<*>) :: Parser t (a -> b) -> Parser t a -> Parser t b #

liftA2 :: (a -> b -> c) -> Parser t a -> Parser t b -> Parser t c #

(*>) :: Parser t a -> Parser t b -> Parser t b #

(<*) :: Parser t a -> Parser t b -> Parser t a #

Applicative (Parser t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.Lex

Methods

pure :: a -> Parser t a #

(<*>) :: Parser t (a -> b) -> Parser t a -> Parser t b #

liftA2 :: (a -> b -> c) -> Parser t a -> Parser t b -> Parser t c #

(*>) :: Parser t a -> Parser t b -> Parser t b #

(<*) :: Parser t a -> Parser t b -> Parser t a #

Applicative (Parser t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.Parser

Methods

pure :: a -> Parser t a #

(<*>) :: Parser t (a -> b) -> Parser t a -> Parser t b #

liftA2 :: (a -> b -> c) -> Parser t a -> Parser t b -> Parser t c #

(*>) :: Parser t a -> Parser t b -> Parser t b #

(<*) :: Parser t a -> Parser t b -> Parser t a #

Applicative (Parser s) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.StateText

Methods

pure :: a -> Parser s a #

(<*>) :: Parser s (a -> b) -> Parser s a -> Parser s b #

liftA2 :: (a -> b -> c) -> Parser s a -> Parser s b -> Parser s c #

(*>) :: Parser s a -> Parser s b -> Parser s b #

(<*) :: Parser s a -> Parser s b -> Parser s a #

Applicative (IParser t) 
Instance details

Defined in Data.Text.Internal.Read

Methods

pure :: a -> IParser t a #

(<*>) :: IParser t (a -> b) -> IParser t a -> IParser t b #

liftA2 :: (a -> b -> c) -> IParser t a -> IParser t b -> IParser t c #

(*>) :: IParser t a -> IParser t b -> IParser t b #

(<*) :: IParser t a -> IParser t b -> IParser t a #

Monoid a => Applicative ((,) a) 
Instance details

Defined in GHC.Internal.Base

Methods

pure :: a0 -> (a, a0) #

(<*>) :: (a, a0 -> b) -> (a, a0) -> (a, b) #

liftA2 :: (a0 -> b -> c) -> (a, a0) -> (a, b) -> (a, c) #

(*>) :: (a, a0) -> (a, b) -> (a, b) #

(<*) :: (a, a0) -> (a, b) -> (a, a0) #

Arrow a => Applicative (WrappedArrow a b) 
Instance details

Defined in Control.Applicative

Methods

pure :: a0 -> WrappedArrow a b a0 #

(<*>) :: WrappedArrow a b (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 #

liftA2 :: (a0 -> b0 -> c) -> WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b c #

(*>) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b b0 #

(<*) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 #

Applicative m => Applicative (Kleisli m a) 
Instance details

Defined in GHC.Internal.Control.Arrow

Methods

pure :: a0 -> Kleisli m a a0 #

(<*>) :: Kleisli m a (a0 -> b) -> Kleisli m a a0 -> Kleisli m a b #

liftA2 :: (a0 -> b -> c) -> Kleisli m a a0 -> Kleisli m a b -> Kleisli m a c #

(*>) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a b #

(<*) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a a0 #

Monoid m => Applicative (Const m :: Type -> Type) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Methods

pure :: a -> Const m a #

(<*>) :: Const m (a -> b) -> Const m a -> Const m b #

liftA2 :: (a -> b -> c) -> Const m a -> Const m b -> Const m c #

(*>) :: Const m a -> Const m b -> Const m b #

(<*) :: Const m a -> Const m b -> Const m a #

Applicative (Parser s t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.StateLazy

Methods

pure :: a -> Parser s t a #

(<*>) :: Parser s t (a -> b) -> Parser s t a -> Parser s t b #

liftA2 :: (a -> b -> c) -> Parser s t a -> Parser s t b -> Parser s t c #

(*>) :: Parser s t a -> Parser s t b -> Parser s t b #

(<*) :: Parser s t a -> Parser s t b -> Parser s t a #

Applicative (Parser s t) Source # 
Instance details

Defined in Text.ParserCombinators.Poly.StateParser

Methods

pure :: a -> Parser s t a #

(<*>) :: Parser s t (a -> b) -> Parser s t a -> Parser s t b #

liftA2 :: (a -> b -> c) -> Parser s t a -> Parser s t b -> Parser s t c #

(*>) :: Parser s t a -> Parser s t b -> Parser s t b #

(<*) :: Parser s t a -> Parser s t b -> Parser s t a #

(Monoid a, Monoid b) => Applicative ((,,) a b) 
Instance details

Defined in GHC.Internal.Base

Methods

pure :: a0 -> (a, b, a0) #

(<*>) :: (a, b, a0 -> b0) -> (a, b, a0) -> (a, b, b0) #

liftA2 :: (a0 -> b0 -> c) -> (a, b, a0) -> (a, b, b0) -> (a, b, c) #

(*>) :: (a, b, a0) -> (a, b, b0) -> (a, b, b0) #

(<*) :: (a, b, a0) -> (a, b, b0) -> (a, b, a0) #

(Applicative f, Applicative g) => Applicative (Product f g) 
Instance details

Defined in Data.Functor.Product

Methods

pure :: a -> Product f g a #

(<*>) :: Product f g (a -> b) -> Product f g a -> Product f g b #

liftA2 :: (a -> b -> c) -> Product f g a -> Product f g b -> Product f g c #

(*>) :: Product f g a -> Product f g b -> Product f g b #

(<*) :: Product f g a -> Product f g b -> Product f g a #

Applicative (Parser s t e) Source # 
Instance details

Defined in Text.ParserCombinators.HuttonMeijerWallace

Methods

pure :: a -> Parser s t e a #

(<*>) :: Parser s t e (a -> b) -> Parser s t e a -> Parser s t e b #

liftA2 :: (a -> b -> c) -> Parser s t e a -> Parser s t e b -> Parser s t e c #

(*>) :: Parser s t e a -> Parser s t e b -> Parser s t e b #

(<*) :: Parser s t e a -> Parser s t e b -> Parser s t e a #

(Monoid a, Monoid b, Monoid c) => Applicative ((,,,) a b c) 
Instance details

Defined in GHC.Internal.Base

Methods

pure :: a0 -> (a, b, c, a0) #

(<*>) :: (a, b, c, a0 -> b0) -> (a, b, c, a0) -> (a, b, c, b0) #

liftA2 :: (a0 -> b0 -> c0) -> (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, c0) #

(*>) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, b0) #

(<*) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, a0) #

Applicative ((->) r) 
Instance details

Defined in GHC.Internal.Base

Methods

pure :: a -> r -> a #

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

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

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

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

(Applicative f, Applicative g) => Applicative (Compose f g) 
Instance details

Defined in Data.Functor.Compose

Methods

pure :: a -> Compose f g a #

(<*>) :: Compose f g (a -> b) -> Compose f g a -> Compose f g b #

liftA2 :: (a -> b -> c) -> Compose f g a -> Compose f g b -> Compose f g c #

(*>) :: Compose f g a -> Compose f g b -> Compose f g b #

(<*) :: Compose f g a -> Compose f g b -> Compose f g a #

(<$>) :: Functor f => (a -> b) -> f a -> f b #

(<$) :: Functor f => a -> f b -> f a #

newtype WrappedArrow (a :: Type -> Type -> Type) b c #

Constructors

WrapArrow 

Fields

Instances

Instances details
Generic1 (WrappedArrow a b :: Type -> Type) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep1 (WrappedArrow a b :: Type -> Type) 
Instance details

Defined in Control.Applicative

type Rep1 (WrappedArrow a b :: Type -> Type) = D1 ('MetaData "WrappedArrow" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapArrow" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapArrow") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 (a b))))

Methods

from1 :: WrappedArrow a b a0 -> Rep1 (WrappedArrow a b) a0

to1 :: Rep1 (WrappedArrow a b) a0 -> WrappedArrow a b a0

(ArrowZero a, ArrowPlus a) => Alternative (WrappedArrow a b) 
Instance details

Defined in Control.Applicative

Methods

empty :: WrappedArrow a b a0 #

(<|>) :: WrappedArrow a b a0 -> WrappedArrow a b a0 -> WrappedArrow a b a0 #

some :: WrappedArrow a b a0 -> WrappedArrow a b [a0] #

many :: WrappedArrow a b a0 -> WrappedArrow a b [a0] #

Arrow a => Applicative (WrappedArrow a b) 
Instance details

Defined in Control.Applicative

Methods

pure :: a0 -> WrappedArrow a b a0 #

(<*>) :: WrappedArrow a b (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 #

liftA2 :: (a0 -> b0 -> c) -> WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b c #

(*>) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b b0 #

(<*) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 #

Arrow a => Functor (WrappedArrow a b) 
Instance details

Defined in Control.Applicative

Methods

fmap :: (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0

(<$) :: a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 #

(Typeable a, Typeable b, Typeable c, Data (a b c)) => Data (WrappedArrow a b c) 
Instance details

Defined in Control.Applicative

Methods

gfoldl :: (forall d b0. Data d => c0 (d -> b0) -> d -> c0 b0) -> (forall g. g -> c0 g) -> WrappedArrow a b c -> c0 (WrappedArrow a b c)

gunfold :: (forall b0 r. Data b0 => c0 (b0 -> r) -> c0 r) -> (forall r. r -> c0 r) -> Constr -> c0 (WrappedArrow a b c)

toConstr :: WrappedArrow a b c -> Constr

dataTypeOf :: WrappedArrow a b c -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c0 (t d)) -> Maybe (c0 (WrappedArrow a b c))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c0 (t d e)) -> Maybe (c0 (WrappedArrow a b c))

gmapT :: (forall b0. Data b0 => b0 -> b0) -> WrappedArrow a b c -> WrappedArrow a b c

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WrappedArrow a b c -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WrappedArrow a b c -> r

gmapQ :: (forall d. Data d => d -> u) -> WrappedArrow a b c -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> WrappedArrow a b c -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> WrappedArrow a b c -> m (WrappedArrow a b c)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WrappedArrow a b c -> m (WrappedArrow a b c)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WrappedArrow a b c -> m (WrappedArrow a b c)

Generic (WrappedArrow a b c) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep (WrappedArrow a b c) 
Instance details

Defined in Control.Applicative

type Rep (WrappedArrow a b c) = D1 ('MetaData "WrappedArrow" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapArrow" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapArrow") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (a b c))))

Methods

from :: WrappedArrow a b c -> Rep (WrappedArrow a b c) x

to :: Rep (WrappedArrow a b c) x -> WrappedArrow a b c

type Rep1 (WrappedArrow a b :: Type -> Type) 
Instance details

Defined in Control.Applicative

type Rep1 (WrappedArrow a b :: Type -> Type) = D1 ('MetaData "WrappedArrow" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapArrow" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapArrow") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 (a b))))
type Rep (WrappedArrow a b c) 
Instance details

Defined in Control.Applicative

type Rep (WrappedArrow a b c) = D1 ('MetaData "WrappedArrow" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapArrow" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapArrow") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (a b c))))

newtype WrappedMonad (m :: Type -> Type) a #

Constructors

WrapMonad 

Fields

Instances

Instances details
Generic1 (WrappedMonad m :: Type -> Type) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep1 (WrappedMonad m :: Type -> Type) 
Instance details

Defined in Control.Applicative

type Rep1 (WrappedMonad m :: Type -> Type) = D1 ('MetaData "WrappedMonad" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapMonad" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapMonad") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 m)))

Methods

from1 :: WrappedMonad m a -> Rep1 (WrappedMonad m) a

to1 :: Rep1 (WrappedMonad m) a -> WrappedMonad m a

MonadPlus m => Alternative (WrappedMonad m) 
Instance details

Defined in Control.Applicative

Methods

empty :: WrappedMonad m a #

(<|>) :: WrappedMonad m a -> WrappedMonad m a -> WrappedMonad m a #

some :: WrappedMonad m a -> WrappedMonad m [a] #

many :: WrappedMonad m a -> WrappedMonad m [a] #

Monad m => Applicative (WrappedMonad m) 
Instance details

Defined in Control.Applicative

Methods

pure :: a -> WrappedMonad m a #

(<*>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b #

liftA2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c #

(*>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b #

(<*) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a #

Monad m => Functor (WrappedMonad m) 
Instance details

Defined in Control.Applicative

Methods

fmap :: (a -> b) -> WrappedMonad m a -> WrappedMonad m b

(<$) :: a -> WrappedMonad m b -> WrappedMonad m a #

Monad m => Monad (WrappedMonad m) 
Instance details

Defined in Control.Applicative

Methods

(>>=) :: WrappedMonad m a -> (a -> WrappedMonad m b) -> WrappedMonad m b

(>>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b

return :: a -> WrappedMonad m a

(Typeable m, Typeable a, Data (m a)) => Data (WrappedMonad m a) 
Instance details

Defined in Control.Applicative

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WrappedMonad m a -> c (WrappedMonad m a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (WrappedMonad m a)

toConstr :: WrappedMonad m a -> Constr

dataTypeOf :: WrappedMonad m a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (WrappedMonad m a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (WrappedMonad m a))

gmapT :: (forall b. Data b => b -> b) -> WrappedMonad m a -> WrappedMonad m a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonad m a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonad m a -> r

gmapQ :: (forall d. Data d => d -> u) -> WrappedMonad m a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> WrappedMonad m a -> u

gmapM :: Monad m0 => (forall d. Data d => d -> m0 d) -> WrappedMonad m a -> m0 (WrappedMonad m a)

gmapMp :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> WrappedMonad m a -> m0 (WrappedMonad m a)

gmapMo :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> WrappedMonad m a -> m0 (WrappedMonad m a)

Generic (WrappedMonad m a) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep (WrappedMonad m a) 
Instance details

Defined in Control.Applicative

type Rep (WrappedMonad m a) = D1 ('MetaData "WrappedMonad" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapMonad" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapMonad") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (m a))))

Methods

from :: WrappedMonad m a -> Rep (WrappedMonad m a) x

to :: Rep (WrappedMonad m a) x -> WrappedMonad m a

type Rep1 (WrappedMonad m :: Type -> Type) 
Instance details

Defined in Control.Applicative

type Rep1 (WrappedMonad m :: Type -> Type) = D1 ('MetaData "WrappedMonad" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapMonad" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapMonad") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 m)))
type Rep (WrappedMonad m a) 
Instance details

Defined in Control.Applicative

type Rep (WrappedMonad m a) = D1 ('MetaData "WrappedMonad" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapMonad" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapMonad") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (m a))))

optional :: Alternative f => f a -> f (Maybe a) #

(<**>) :: Applicative f => f a -> f (a -> b) -> f b #

liftA :: Applicative f => (a -> b) -> f a -> f b #

liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d #

asum :: (Foldable t, Alternative f) => t (f a) -> f a #

newtype Const a (b :: k) #

Constructors

Const 

Fields

Instances

Instances details
Generic1 (Const a :: k -> Type) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Associated Types

type Rep1 (Const a :: k -> Type) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

type Rep1 (Const a :: k -> Type) = D1 ('MetaData "Const" "GHC.Internal.Data.Functor.Const" "ghc-internal" 'True) (C1 ('MetaCons "Const" 'PrefixI 'True) (S1 ('MetaSel ('Just "getConst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

Methods

from1 :: forall (a0 :: k). Const a a0 -> Rep1 (Const a :: k -> Type) a0

to1 :: forall (a0 :: k). Rep1 (Const a :: k -> Type) a0 -> Const a a0

Bifoldable (Const :: Type -> Type -> Type) 
Instance details

Defined in Data.Bifoldable

Methods

bifold :: Monoid m => Const m m -> m

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Const a b -> m

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Const a b -> c

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Const a b -> c

Bifoldable1 (Const :: Type -> Type -> Type) 
Instance details

Defined in Data.Bifoldable1

Methods

bifold1 :: Semigroup m => Const m m -> m

bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> Const a b -> m

Bifunctor (Const :: Type -> Type -> Type) 
Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> Const a c -> Const b d

first :: (a -> b) -> Const a c -> Const b c

second :: (b -> c) -> Const a b -> Const a c

Bitraversable (Const :: Type -> Type -> Type) 
Instance details

Defined in Data.Bitraversable

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Const a b -> f (Const c d)

Eq2 (Const :: Type -> Type -> Type) 
Instance details

Defined in Data.Functor.Classes

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Const a c -> Const b d -> Bool

Ord2 (Const :: Type -> Type -> Type) 
Instance details

Defined in Data.Functor.Classes

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Const a c -> Const b d -> Ordering

Read2 (Const :: Type -> Type -> Type) 
Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Const a b)

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Const a b]

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Const a b)

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Const a b]

Show2 (Const :: Type -> Type -> Type) 
Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Const a b -> ShowS

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Const a b] -> ShowS

Eq a => Eq1 (Const a :: Type -> Type) 
Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a0 -> b -> Bool) -> Const a a0 -> Const a b -> Bool

Ord a => Ord1 (Const a :: Type -> Type) 
Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a0 -> b -> Ordering) -> Const a a0 -> Const a b -> Ordering

Read a => Read1 (Const a :: Type -> Type) 
Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Const a a0)

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Const a a0]

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Const a a0)

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Const a a0]

Show a => Show1 (Const a :: Type -> Type) 
Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> Const a a0 -> ShowS

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Const a a0] -> ShowS

Contravariant (Const a :: Type -> Type) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a0) -> Const a a0 -> Const a a'

(>$) :: b -> Const a b -> Const a a0

Monoid m => Applicative (Const m :: Type -> Type) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Methods

pure :: a -> Const m a #

(<*>) :: Const m (a -> b) -> Const m a -> Const m b #

liftA2 :: (a -> b -> c) -> Const m a -> Const m b -> Const m c #

(*>) :: Const m a -> Const m b -> Const m b #

(<*) :: Const m a -> Const m b -> Const m a #

Functor (Const m :: Type -> Type) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Methods

fmap :: (a -> b) -> Const m a -> Const m b

(<$) :: a -> Const m b -> Const m a #

Foldable (Const m :: Type -> Type) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Methods

fold :: Monoid m0 => Const m m0 -> m0

foldMap :: Monoid m0 => (a -> m0) -> Const m a -> m0

foldMap' :: Monoid m0 => (a -> m0) -> Const m a -> m0

foldr :: (a -> b -> b) -> b -> Const m a -> b

foldr' :: (a -> b -> b) -> b -> Const m a -> b

foldl :: (b -> a -> b) -> b -> Const m a -> b

foldl' :: (b -> a -> b) -> b -> Const m a -> b

foldr1 :: (a -> a -> a) -> Const m a -> a

foldl1 :: (a -> a -> a) -> Const m a -> a

toList :: Const m a -> [a]

null :: Const m a -> Bool

length :: Const m a -> Int

elem :: Eq a => a -> Const m a -> Bool

maximum :: Ord a => Const m a -> a

minimum :: Ord a => Const m a -> a

sum :: Num a => Const m a -> a

product :: Num a => Const m a -> a

Monoid a => Monoid (Const a b) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Methods

mempty :: Const a b

mappend :: Const a b -> Const a b -> Const a b

mconcat :: [Const a b] -> Const a b

Semigroup a => Semigroup (Const a b) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Methods

(<>) :: Const a b -> Const a b -> Const a b

sconcat :: NonEmpty (Const a b) -> Const a b

stimes :: Integral b0 => b0 -> Const a b -> Const a b

Bits a => Bits (Const a b) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Methods

(.&.) :: Const a b -> Const a b -> Const a b

(.|.) :: Const a b -> Const a b -> Const a b

xor :: Const a b -> Const a b -> Const a b

complement :: Const a b -> Const a b

shift :: Const a b -> Int -> Const a b

rotate :: Const a b -> Int -> Const a b

zeroBits :: Const a b

bit :: Int -> Const a b

setBit :: Const a b -> Int -> Const a b

clearBit :: Const a b -> Int -> Const a b

complementBit :: Const a b -> Int -> Const a b

testBit :: Const a b -> Int -> Bool

bitSizeMaybe :: Const a b -> Maybe Int

bitSize :: Const a b -> Int

isSigned :: Const a b -> Bool

shiftL :: Const a b -> Int -> Const a b

unsafeShiftL :: Const a b -> Int -> Const a b

shiftR :: Const a b -> Int -> Const a b

unsafeShiftR :: Const a b -> Int -> Const a b

rotateL :: Const a b -> Int -> Const a b

rotateR :: Const a b -> Int -> Const a b

popCount :: Const a b -> Int

FiniteBits a => FiniteBits (Const a b) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Methods

finiteBitSize :: Const a b -> Int

countLeadingZeros :: Const a b -> Int

countTrailingZeros :: Const a b -> Int

Bounded a => Bounded (Const a b) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Methods

minBound :: Const a b

maxBound :: Const a b

Enum a => Enum (Const a b) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Methods

succ :: Const a b -> Const a b

pred :: Const a b -> Const a b

toEnum :: Int -> Const a b

fromEnum :: Const a b -> Int

enumFrom :: Const a b -> [Const a b]

enumFromThen :: Const a b -> Const a b -> [Const a b]

enumFromTo :: Const a b -> Const a b -> [Const a b]

enumFromThenTo :: Const a b -> Const a b -> Const a b -> [Const a b]

Floating a => Floating (Const a b) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Methods

pi :: Const a b

exp :: Const a b -> Const a b

log :: Const a b -> Const a b

sqrt :: Const a b -> Const a b

(**) :: Const a b -> Const a b -> Const a b

logBase :: Const a b -> Const a b -> Const a b

sin :: Const a b -> Const a b

cos :: Const a b -> Const a b

tan :: Const a b -> Const a b

asin :: Const a b -> Const a b

acos :: Const a b -> Const a b

atan :: Const a b -> Const a b

sinh :: Const a b -> Const a b

cosh :: Const a b -> Const a b

tanh :: Const a b -> Const a b

asinh :: Const a b -> Const a b

acosh :: Const a b -> Const a b

atanh :: Const a b -> Const a b

log1p :: Const a b -> Const a b

expm1 :: Const a b -> Const a b

log1pexp :: Const a b -> Const a b

log1mexp :: Const a b -> Const a b

RealFloat a => RealFloat (Const a b) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Methods

floatRadix :: Const a b -> Integer

floatDigits :: Const a b -> Int

floatRange :: Const a b -> (Int, Int)

decodeFloat :: Const a b -> (Integer, Int)

encodeFloat :: Integer -> Int -> Const a b

exponent :: Const a b -> Int

significand :: Const a b -> Const a b

scaleFloat :: Int -> Const a b -> Const a b

isNaN :: Const a b -> Bool

isInfinite :: Const a b -> Bool

isDenormalized :: Const a b -> Bool

isNegativeZero :: Const a b -> Bool

isIEEE :: Const a b -> Bool

atan2 :: Const a b -> Const a b -> Const a b

Storable a => Storable (Const a b) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Methods

sizeOf :: Const a b -> Int

alignment :: Const a b -> Int

peekElemOff :: Ptr (Const a b) -> Int -> IO (Const a b)

pokeElemOff :: Ptr (Const a b) -> Int -> Const a b -> IO ()

peekByteOff :: Ptr b0 -> Int -> IO (Const a b)

pokeByteOff :: Ptr b0 -> Int -> Const a b -> IO ()

peek :: Ptr (Const a b) -> IO (Const a b)

poke :: Ptr (Const a b) -> Const a b -> IO ()

Generic (Const a b) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Associated Types

type Rep (Const a b) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

type Rep (Const a b) = D1 ('MetaData "Const" "GHC.Internal.Data.Functor.Const" "ghc-internal" 'True) (C1 ('MetaCons "Const" 'PrefixI 'True) (S1 ('MetaSel ('Just "getConst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

Methods

from :: Const a b -> Rep (Const a b) x

to :: Rep (Const a b) x -> Const a b

Ix a => Ix (Const a b) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Methods

range :: (Const a b, Const a b) -> [Const a b]

index :: (Const a b, Const a b) -> Const a b -> Int

unsafeIndex :: (Const a b, Const a b) -> Const a b -> Int

inRange :: (Const a b, Const a b) -> Const a b -> Bool

rangeSize :: (Const a b, Const a b) -> Int

unsafeRangeSize :: (Const a b, Const a b) -> Int

Num a => Num (Const a b) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Methods

(+) :: Const a b -> Const a b -> Const a b

(-) :: Const a b -> Const a b -> Const a b

(*) :: Const a b -> Const a b -> Const a b

negate :: Const a b -> Const a b

abs :: Const a b -> Const a b

signum :: Const a b -> Const a b

fromInteger :: Integer -> Const a b

Read a => Read (Const a b) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Methods

readsPrec :: Int -> ReadS (Const a b)

readList :: ReadS [Const a b]

readPrec :: ReadPrec (Const a b)

readListPrec :: ReadPrec [Const a b]

Fractional a => Fractional (Const a b) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Methods

(/) :: Const a b -> Const a b -> Const a b

recip :: Const a b -> Const a b

fromRational :: Rational -> Const a b

Integral a => Integral (Const a b) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Methods

quot :: Const a b -> Const a b -> Const a b

rem :: Const a b -> Const a b -> Const a b

div :: Const a b -> Const a b -> Const a b

mod :: Const a b -> Const a b -> Const a b

quotRem :: Const a b -> Const a b -> (Const a b, Const a b)

divMod :: Const a b -> Const a b -> (Const a b, Const a b)

toInteger :: Const a b -> Integer

Real a => Real (Const a b) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Methods

toRational :: Const a b -> Rational

RealFrac a => RealFrac (Const a b) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Methods

properFraction :: Integral b0 => Const a b -> (b0, Const a b)

truncate :: Integral b0 => Const a b -> b0

round :: Integral b0 => Const a b -> b0

ceiling :: Integral b0 => Const a b -> b0

floor :: Integral b0 => Const a b -> b0

Show a => Show (Const a b) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Methods

showsPrec :: Int -> Const a b -> ShowS

show :: Const a b -> String

showList :: [Const a b] -> ShowS

Eq a => Eq (Const a b) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Methods

(==) :: Const a b -> Const a b -> Bool

(/=) :: Const a b -> Const a b -> Bool

Ord a => Ord (Const a b) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Methods

compare :: Const a b -> Const a b -> Ordering

(<) :: Const a b -> Const a b -> Bool

(<=) :: Const a b -> Const a b -> Bool

(>) :: Const a b -> Const a b -> Bool

(>=) :: Const a b -> Const a b -> Bool

max :: Const a b -> Const a b -> Const a b

min :: Const a b -> Const a b -> Const a b

type Rep1 (Const a :: k -> Type) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

type Rep1 (Const a :: k -> Type) = D1 ('MetaData "Const" "GHC.Internal.Data.Functor.Const" "ghc-internal" 'True) (C1 ('MetaCons "Const" 'PrefixI 'True) (S1 ('MetaSel ('Just "getConst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
type Rep (Const a b) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

type Rep (Const a b) = D1 ('MetaData "Const" "GHC.Internal.Data.Functor.Const" "ghc-internal" 'True) (C1 ('MetaCons "Const" 'PrefixI 'True) (S1 ('MetaSel ('Just "getConst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

newtype ZipList a #

Constructors

ZipList 

Fields

Instances

Instances details
Alternative ZipList 
Instance details

Defined in GHC.Internal.Functor.ZipList

Methods

empty :: ZipList a #

(<|>) :: ZipList a -> ZipList a -> ZipList a #

some :: ZipList a -> ZipList [a] #

many :: ZipList a -> ZipList [a] #

Applicative ZipList 
Instance details

Defined in GHC.Internal.Functor.ZipList

Methods

pure :: a -> ZipList a #

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

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

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

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

Functor ZipList 
Instance details

Defined in GHC.Internal.Functor.ZipList

Methods

fmap :: (a -> b) -> ZipList a -> ZipList b

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

Foldable ZipList 
Instance details

Defined in GHC.Internal.Functor.ZipList

Methods

fold :: Monoid m => ZipList m -> m

foldMap :: Monoid m => (a -> m) -> ZipList a -> m

foldMap' :: Monoid m => (a -> m) -> ZipList a -> m

foldr :: (a -> b -> b) -> b -> ZipList a -> b

foldr' :: (a -> b -> b) -> b -> ZipList a -> b

foldl :: (b -> a -> b) -> b -> ZipList a -> b

foldl' :: (b -> a -> b) -> b -> ZipList a -> b

foldr1 :: (a -> a -> a) -> ZipList a -> a

foldl1 :: (a -> a -> a) -> ZipList a -> a

toList :: ZipList a -> [a]

null :: ZipList a -> Bool

length :: ZipList a -> Int

elem :: Eq a => a -> ZipList a -> Bool

maximum :: Ord a => ZipList a -> a

minimum :: Ord a => ZipList a -> a

sum :: Num a => ZipList a -> a

product :: Num a => ZipList a -> a

Traversable ZipList 
Instance details

Defined in GHC.Internal.Functor.ZipList

Methods

traverse :: Applicative f => (a -> f b) -> ZipList a -> f (ZipList b)

sequenceA :: Applicative f => ZipList (f a) -> f (ZipList a)

mapM :: Monad m => (a -> m b) -> ZipList a -> m (ZipList b)

sequence :: Monad m => ZipList (m a) -> m (ZipList a)

Generic1 ZipList 
Instance details

Defined in GHC.Internal.Functor.ZipList

Associated Types

type Rep1 ZipList 
Instance details

Defined in GHC.Internal.Functor.ZipList

type Rep1 ZipList = D1 ('MetaData "ZipList" "GHC.Internal.Functor.ZipList" "ghc-internal" 'True) (C1 ('MetaCons "ZipList" 'PrefixI 'True) (S1 ('MetaSel ('Just "getZipList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 [])))

Methods

from1 :: ZipList a -> Rep1 ZipList a

to1 :: Rep1 ZipList a -> ZipList a

Data a => Data (ZipList a) 
Instance details

Defined in GHC.Internal.Functor.ZipList

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ZipList a -> c (ZipList a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ZipList a)

toConstr :: ZipList a -> Constr

dataTypeOf :: ZipList a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ZipList a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ZipList a))

gmapT :: (forall b. Data b => b -> b) -> ZipList a -> ZipList a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ZipList a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ZipList a -> r

gmapQ :: (forall d. Data d => d -> u) -> ZipList a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> ZipList a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ZipList a -> m (ZipList a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ZipList a -> m (ZipList a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ZipList a -> m (ZipList a)

Generic (ZipList a) 
Instance details

Defined in GHC.Internal.Functor.ZipList

Associated Types

type Rep (ZipList a) 
Instance details

Defined in GHC.Internal.Functor.ZipList

type Rep (ZipList a) = D1 ('MetaData "ZipList" "GHC.Internal.Functor.ZipList" "ghc-internal" 'True) (C1 ('MetaCons "ZipList" 'PrefixI 'True) (S1 ('MetaSel ('Just "getZipList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [a])))

Methods

from :: ZipList a -> Rep (ZipList a) x

to :: Rep (ZipList a) x -> ZipList a

Read a => Read (ZipList a) 
Instance details

Defined in GHC.Internal.Functor.ZipList

Methods

readsPrec :: Int -> ReadS (ZipList a)

readList :: ReadS [ZipList a]

readPrec :: ReadPrec (ZipList a)

readListPrec :: ReadPrec [ZipList a]

Show a => Show (ZipList a) 
Instance details

Defined in GHC.Internal.Functor.ZipList

Methods

showsPrec :: Int -> ZipList a -> ShowS

show :: ZipList a -> String

showList :: [ZipList a] -> ShowS

Eq a => Eq (ZipList a) 
Instance details

Defined in GHC.Internal.Functor.ZipList

Methods

(==) :: ZipList a -> ZipList a -> Bool

(/=) :: ZipList a -> ZipList a -> Bool

Ord a => Ord (ZipList a) 
Instance details

Defined in GHC.Internal.Functor.ZipList

Methods

compare :: ZipList a -> ZipList a -> Ordering

(<) :: ZipList a -> ZipList a -> Bool

(<=) :: ZipList a -> ZipList a -> Bool

(>) :: ZipList a -> ZipList a -> Bool

(>=) :: ZipList a -> ZipList a -> Bool

max :: ZipList a -> ZipList a -> ZipList a

min :: ZipList a -> ZipList a -> ZipList a

type Rep1 ZipList 
Instance details

Defined in GHC.Internal.Functor.ZipList

type Rep1 ZipList = D1 ('MetaData "ZipList" "GHC.Internal.Functor.ZipList" "ghc-internal" 'True) (C1 ('MetaCons "ZipList" 'PrefixI 'True) (S1 ('MetaSel ('Just "getZipList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 [])))
type Rep (ZipList a) 
Instance details

Defined in GHC.Internal.Functor.ZipList

type Rep (ZipList a) = D1 ('MetaData "ZipList" "GHC.Internal.Functor.ZipList" "ghc-internal" 'True) (C1 ('MetaCons "ZipList" 'PrefixI 'True) (S1 ('MetaSel ('Just "getZipList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [a])))