on master help sign in
Document HList, HNonEmpty, HMaybe, HThese and HEither
4b50256Ollie Charles
src/Rel8/Column/Either.hs+3
@@ -35,6 +35,9 @@ import Rel8.Table.Either ( EitherTable )
35import Rel8.Table.Recontextualize ( Recontextualize )
35import Rel8.Table.Recontextualize ( Recontextualize )
36
36
37
37
38+-- | Nest an 'Either' value within a 'Rel8able'. @HEither f a b@ will produce a
39+-- 'EitherTable' @a b@ in the 'Expr' context, and a 'Either' @a b@ in the
40+-- 'Result' context.
38type HEither :: K.Context -> Type -> Type -> Type
41type HEither :: K.Context -> Type -> Type -> Type
39type family HEither context where
42type family HEither context where
40 HEither (Reify context) = AHEither context
43 HEither (Reify context) = AHEither context
src/Rel8/Column/List.hs+2
@@ -35,6 +35,8 @@ import Rel8.Table.Recontextualize ( Recontextualize )
35import Rel8.Table.Unreify ( Unreifiability(..), Unreifiable, unreifiability )
35import Rel8.Table.Unreify ( Unreifiability(..), Unreifiable, unreifiability )
36
36
37
37
38+-- | Nest a list within a 'Rel8able'. @HList f a@ will produce a 'ListTable'
39+-- @a@ in the 'Expr' context, and a @[a]@ in the 'Result' context.
38type HList :: K.Context -> Type -> Type
40type HList :: K.Context -> Type -> Type
39type family HList context where
41type family HList context where
40 HList (Reify context) = AHList context
42 HList (Reify context) = AHList context
src/Rel8/Column/Maybe.hs+3
@@ -34,6 +34,9 @@ import Rel8.Table.Maybe ( MaybeTable )
34import Rel8.Table.Recontextualize ( Recontextualize )
34import Rel8.Table.Recontextualize ( Recontextualize )
35
35
36
36
37+-- | Nest a 'Maybe' value within a 'Rel8able'. @HMaybe f a@ will produce a
38+-- 'MaybeTable' @a@ in the 'Expr' context, and a 'Maybe' @a@ in the 'Result'
39+-- context.
37type HMaybe :: K.Context -> Type -> Type
40type HMaybe :: K.Context -> Type -> Type
38type family HMaybe context where
41type family HMaybe context where
39 HMaybe (Reify context) = AHMaybe context
42 HMaybe (Reify context) = AHMaybe context
src/Rel8/Column/NonEmpty.hs+3
@@ -36,6 +36,9 @@ import Rel8.Table.Recontextualize ( Recontextualize )
36import Rel8.Table.Unreify ( Unreifiability(..), Unreifiable, unreifiability )
36import Rel8.Table.Unreify ( Unreifiability(..), Unreifiable, unreifiability )
37
37
38
38
39+-- | Nest a 'NonEmpty' list within a 'Rel8able'. @HNonEmpty f a@ will produce a
40+-- 'NonEmptyTable' @a@ in the 'Expr' context, and a 'NonEmpty' @a@ in the
41+-- 'Result' context.
39type HNonEmpty :: K.Context -> Type -> Type
42type HNonEmpty :: K.Context -> Type -> Type
40type family HNonEmpty context where
43type family HNonEmpty context where
41 HNonEmpty (Reify context) = AHNonEmpty context
44 HNonEmpty (Reify context) = AHNonEmpty context
src/Rel8/Column/These.hs+3
@@ -39,6 +39,9 @@ import Rel8.Table.These ( TheseTable )
39import Data.These ( These )
39import Data.These ( These )
40
40
41
41
42+-- | Nest an 'These' value within a 'Rel8able'. @HThese f a b@ will produce a
43+-- 'TheseTable' @a b@ in the 'Expr' context, and a 'These' @a b@ in the
44+-- 'Result' context.
42type HThese :: K.Context -> Type -> Type -> Type
45type HThese :: K.Context -> Type -> Type -> Type
43type family HThese context where
46type family HThese context where
44 HThese (Reify context) = AHThese context
47 HThese (Reify context) = AHThese context