| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Rel8.Internal.Table.Alternative
Documentation
class AltTable (f :: Type -> Type) where Source #
Like Alt in Haskell. This class is purely a Rel8 concept, and allows you
to take a choice between two tables. See also AlternativeTable.
For example, using <|>: on MaybeTable allows you to combine two
tables and to return the first one that is a "just" MaybeTable.
Methods
(<|>:) :: Table Expr a => f a -> f a -> f a infixl 3 Source #
An associative binary operation on Tables.
Instances
| AltTable Query Source # | |
| context ~ Expr => AltTable (ListTable context) Source # | |
| context ~ Expr => AltTable (MaybeTable context) Source # | |
Defined in Rel8.Internal.Table.Maybe Methods (<|>:) :: Table Expr a => MaybeTable context a -> MaybeTable context a -> MaybeTable context a Source # | |
| context ~ Expr => AltTable (NonEmptyTable context) Source # | |
Defined in Rel8.Internal.Table.NonEmpty Methods (<|>:) :: Table Expr a => NonEmptyTable context a -> NonEmptyTable context a -> NonEmptyTable context a Source # | |
| context ~ Expr => AltTable (NullTable context) Source # | |
class AltTable f => AlternativeTable (f :: Type -> Type) where Source #
Like Alternative in Haskell, some Tables form a monoid on applicative
functors.
Instances
| AlternativeTable Query Source # |
|
Defined in Rel8.Internal.Query | |
| context ~ Expr => AlternativeTable (ListTable context) Source # | |
Defined in Rel8.Internal.Table.List | |
| context ~ Expr => AlternativeTable (MaybeTable context) Source # | |
Defined in Rel8.Internal.Table.Maybe Methods emptyTable :: Table Expr a => MaybeTable context a Source # | |
| context ~ Expr => AlternativeTable (NullTable context) Source # | |
Defined in Rel8.Internal.Table.Null | |