on master help sign in
Document HList, HNonEmpty, HMaybe, HThese and HEither
commit4b50256af067ee9a8520eab47a44af3e041e60db authorOllie Charles <ollie@ocharles.org.uk> dateFri 18 Jun 2021, 11:16 (5 years ago) parentda86165
5 files changed+14
src/Rel8/Column/Either.hs+3 src/Rel8/Column/List.hs+2 src/Rel8/Column/Maybe.hs+3 src/Rel8/Column/NonEmpty.hs+3 src/Rel8/Column/These.hs+3
src/Rel8/Column/Either.hs+3
@@ -35,6 +35,9 @@ import Rel8.Table.Either ( EitherTable )
3535import Rel8.Table.Recontextualize ( Recontextualize )
3636
3737
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.
3841type HEither :: K.Context -> Type -> Type -> Type
3942type family HEither context where
4043 HEither (Reify context) = AHEither context
src/Rel8/Column/List.hs+2
@@ -35,6 +35,8 @@ import Rel8.Table.Recontextualize ( Recontextualize )
3535import Rel8.Table.Unreify ( Unreifiability(..), Unreifiable, unreifiability )
3636
3737
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.
3840type HList :: K.Context -> Type -> Type
3941type family HList context where
4042 HList (Reify context) = AHList context
src/Rel8/Column/Maybe.hs+3
@@ -34,6 +34,9 @@ import Rel8.Table.Maybe ( MaybeTable )
3434import Rel8.Table.Recontextualize ( Recontextualize )
3535
3636
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.
3740type HMaybe :: K.Context -> Type -> Type
3841type family HMaybe context where
3942 HMaybe (Reify context) = AHMaybe context
src/Rel8/Column/NonEmpty.hs+3
@@ -36,6 +36,9 @@ import Rel8.Table.Recontextualize ( Recontextualize )
3636import Rel8.Table.Unreify ( Unreifiability(..), Unreifiable, unreifiability )
3737
3838
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.
3942type HNonEmpty :: K.Context -> Type -> Type
4043type family HNonEmpty context where
4144 HNonEmpty (Reify context) = AHNonEmpty context
src/Rel8/Column/These.hs+3
@@ -39,6 +39,9 @@ import Rel8.Table.These ( TheseTable )
3939import Data.These ( These )
4040
4141
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.
4245type HThese :: K.Context -> Type -> Type -> Type
4346type family HThese context where
4447 HThese (Reify context) = AHThese context