| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Rel8.Internal.Table.Projection
Synopsis
- type Projection a b = Transpose (Field a) a -> Transpose (Field a) b
- class Projectable (f :: Type -> Type) where
- project :: Projecting a b => Projection a b -> f a -> f b
- class Biprojectable (p :: Type -> Type -> Type) where
- biproject :: (Projecting a b, Projecting c d) => Projection a b -> Projection c d -> p a c -> p b d
- class (Transposes (Context a) (Field a) a (Transpose (Field a) a), Transposes (Context a) (Field a) b (Transpose (Field a) b)) => Projecting a b
- apply :: forall a b (context :: Context). Projecting a b => Projection a b -> Columns a context -> Columns b context
Documentation
type Projection a b = Transpose (Field a) a -> Transpose (Field a) b Source #
A s is a special type of function Projection a ba -> b whereby the
resulting b is guaranteed to be composed only from columns contained in
a.
class Projectable (f :: Type -> Type) where Source #
means that Projectable ff is a kind of functor on Tables
that allows the mapping of a Projection over its underlying columns.
Instances
class Biprojectable (p :: Type -> Type -> Type) where Source #
means that Biprojectable pp is a kind of bifunctor on
Tables that allows the mapping of a pair of Projections over its
underlying columns.
Methods
biproject :: (Projecting a b, Projecting c d) => Projection a b -> Projection c d -> p a c -> p b d Source #
Map a pair of Projections over p.
Instances
| Biprojectable (EitherTable context) Source # | |
Defined in Rel8.Internal.Table.Either Methods biproject :: (Projecting a b, Projecting c d) => Projection a b -> Projection c d -> EitherTable context a c -> EitherTable context b d Source # | |
| Biprojectable (TheseTable context) Source # | |
Defined in Rel8.Internal.Table.These Methods biproject :: (Projecting a b, Projecting c d) => Projection a b -> Projection c d -> TheseTable context a c -> TheseTable context b d Source # | |
class (Transposes (Context a) (Field a) a (Transpose (Field a) a), Transposes (Context a) (Field a) b (Transpose (Field a) b)) => Projecting a b Source #
The constraint ensures that Projecting a b is a
usable Projection a bProjection.
Instances
| (Transposes (Context a) (Field a) a (Transpose (Field a) a), Transposes (Context a) (Field a) b (Transpose (Field a) b)) => Projecting a b Source # | |
Defined in Rel8.Internal.Table.Projection | |
apply :: forall a b (context :: Context). Projecting a b => Projection a b -> Columns a context -> Columns b context Source #