mirror of
https://github.com/circuithub/rel8.git
synced 2024-09-11 16:05:41 +03:00
Document HList, HNonEmpty, HMaybe, HThese and HEither
This commit is contained in:
parent
da86165828
commit
4b50256af0
@ -35,6 +35,9 @@ import Rel8.Table.Either ( EitherTable )
|
||||
import Rel8.Table.Recontextualize ( Recontextualize )
|
||||
|
||||
|
||||
-- | Nest an 'Either' value within a 'Rel8able'. @HEither f a b@ will produce a
|
||||
-- 'EitherTable' @a b@ in the 'Expr' context, and a 'Either' @a b@ in the
|
||||
-- 'Result' context.
|
||||
type HEither :: K.Context -> Type -> Type -> Type
|
||||
type family HEither context where
|
||||
HEither (Reify context) = AHEither context
|
||||
|
@ -35,6 +35,8 @@ import Rel8.Table.Recontextualize ( Recontextualize )
|
||||
import Rel8.Table.Unreify ( Unreifiability(..), Unreifiable, unreifiability )
|
||||
|
||||
|
||||
-- | Nest a list within a 'Rel8able'. @HList f a@ will produce a 'ListTable'
|
||||
-- @a@ in the 'Expr' context, and a @[a]@ in the 'Result' context.
|
||||
type HList :: K.Context -> Type -> Type
|
||||
type family HList context where
|
||||
HList (Reify context) = AHList context
|
||||
|
@ -34,6 +34,9 @@ import Rel8.Table.Maybe ( MaybeTable )
|
||||
import Rel8.Table.Recontextualize ( Recontextualize )
|
||||
|
||||
|
||||
-- | Nest a 'Maybe' value within a 'Rel8able'. @HMaybe f a@ will produce a
|
||||
-- 'MaybeTable' @a@ in the 'Expr' context, and a 'Maybe' @a@ in the 'Result'
|
||||
-- context.
|
||||
type HMaybe :: K.Context -> Type -> Type
|
||||
type family HMaybe context where
|
||||
HMaybe (Reify context) = AHMaybe context
|
||||
|
@ -36,6 +36,9 @@ import Rel8.Table.Recontextualize ( Recontextualize )
|
||||
import Rel8.Table.Unreify ( Unreifiability(..), Unreifiable, unreifiability )
|
||||
|
||||
|
||||
-- | Nest a 'NonEmpty' list within a 'Rel8able'. @HNonEmpty f a@ will produce a
|
||||
-- 'NonEmptyTable' @a@ in the 'Expr' context, and a 'NonEmpty' @a@ in the
|
||||
-- 'Result' context.
|
||||
type HNonEmpty :: K.Context -> Type -> Type
|
||||
type family HNonEmpty context where
|
||||
HNonEmpty (Reify context) = AHNonEmpty context
|
||||
|
@ -39,6 +39,9 @@ import Rel8.Table.These ( TheseTable )
|
||||
import Data.These ( These )
|
||||
|
||||
|
||||
-- | Nest an 'These' value within a 'Rel8able'. @HThese f a b@ will produce a
|
||||
-- 'TheseTable' @a b@ in the 'Expr' context, and a 'These' @a b@ in the
|
||||
-- 'Result' context.
|
||||
type HThese :: K.Context -> Type -> Type -> Type
|
||||
type family HThese context where
|
||||
HThese (Reify context) = AHThese context
|
||||
|
Loading…
Reference in New Issue
Block a user