<|> -package:matrix-static
base Control.Applicative GHC.Base,
protolude Protolude,
relude Relude.Applicative,
parser-combinators Control.Applicative.Combinators Control.Monad.Combinators,
streaming Streaming,
rio RIO.Prelude,
base-prelude BasePrelude BasePrelude.Operators,
graphviz Data.GraphViz.Parsing,
turtle Turtle,
classy-prelude ClassyPrelude ClassyPrelude,
Cabal-syntax Distribution.Compat.Prelude,
simple-cmd-args SimpleCmdArgs,
effectful-core Effectful.NonDet,
fused-effects Control.Effect.NonDet,
universum Universum.Applicative,
github GitHub.Internal.Prelude,
foundation Foundation Foundation.Parser,
ghc-internal GHC.Internal.Base,
rebase Rebase.Prelude,
threepenny-gui Graphics.UI.Threepenny.Core,
configuration-tools Configuration.Utils.CommandLine,
list-transformer List.Transformer,
bencode Data.BEncode.Parser,
incipit-base Incipit.Base,
opt-env-conf OptEnvConf OptEnvConf.Parser,
cabal-install-solver Distribution.Solver.Compat.Prelude,
purescript-bridge Language.PureScript.Bridge.Builder,
appar Text.Appar.ByteString Text.Appar.LazyByteString Text.Appar.String,
verset Verset,
frisby Text.Parsers.Frisby An associative binary operation
This combinator implements choice. The parser
p <|> q
first applies
p. If it succeeds, the value of
p is
returned. If
p fails
without consuming any input,
parser
q is tried. This combinator is defined equal to the
mplus member of the
MonadPlus class and the
(
<|>) member of
Alternative.
The parser is called
predictive since
q is only tried
when parser
p didn't consume any input (i.e.. the look ahead
is 1). This non-backtracking behaviour allows for both an efficient
implementation of the parser combinators and the generation of good
error messages.
This combinator implements choice. The parser
p <|> q
first applies
p. If it succeeds, the value of
p is
returned. If
p fails
without consuming any input,
parser
q is tried. This combinator is defined equal to the
mplus member of the
MonadPlus class and the
(
<|>) member of
Alternative.
The parser is called
predictive since
q is only tried
when parser
p didn't consume any input (i.e.. the look ahead
is 1). This non-backtracking behaviour allows for both an efficient
implementation of the parser combinators and the generation of good
error messages.
Combines two images horizontally. This is an alias for
horizJoin.
infixr 5
Horizontally join two matrices. Visually:
( A ) <|> ( B ) = ( A | B )
Where both matrices
A and
B have the same number of
rows.
This condition is not checked.
An associative binary operation
Choose between two policies. If the first fails, run the second.
Provide alternative layouts of the same content. Invariant: both
arguments must flatten to the same document.
First try the left parser, if that fails try the right. | If both
fail, the error will come from the right one.
Choose between two parsers. If the first parser fails, try the second
one, but if the first one throws an error, propagate the error. This
operation can arbitrarily backtrack.
Note: this exported operator has different fixity than the same
operator in
Applicative. Hide this operator if you want to use
the
Alternative version.
Choose between two parsers. If the first parser fails, try the second
one, but if the first one throws an error, propagate the error. This
operation can arbitrarily backtrack.
Note: this exported operator has different fixity than the same
operator in
Applicative. Hide this operator if you want to use
the
Alternative version.
Compose two documents, separating them by a new line.
The new line is not inserted if either document is empty.
(
|>) a value onto the target of a
Lens into your
Monad's state and return the result.
When you do not need the result of the operation, (
|>=) is
more flexible.
(
|>) a value onto the target of a
Lens and return the
result.
When you do not need the result of the operation, (
|>~) is
more flexible.
(
|>) a value onto the target of a
Lens into your
Monad's state and return the
old result.
When you do not need the result of the operation, (
|>=) is
more flexible.
(
|>) a value onto the target of a
Lens and return the
old result.
When you do not need the result of the operation, (
|>~) is
more flexible.
Union of two APIs, first takes precedence in case of overlap.
Example:
>>> :{
type MyApi = "books" :> Get '[JSON] [Book] -- GET /books
:<|> "books" :> ReqBody '[JSON] Book :> Post '[JSON] () -- POST /books
:}