on da76712 help sign in
rel8/src/Rel8/Column/List.hs
25 lines 628 B history raw
1{-# language DataKinds #-}
2{-# language StandaloneKindSignatures #-}
3{-# language TypeFamilyDependencies #-}
5module Rel8.Column.List
6 ( HList
7 )
8where
10-- base
11import Data.Kind ( Type )
12import Prelude ()
14-- rel8
15import qualified Rel8.Schema.Kind as K
16import Rel8.Schema.Result ( Result )
17import Rel8.Table.List ( ListTable )
20-- | Nest a list within a 'Rel8able'. @HList f a@ will produce a 'ListTable'
21-- @a@ in the 'Expr' context, and a @[a]@ in the 'Result' context.
22type HList :: K.Context -> Type -> Type
23type family HList context = list | list -> context where
24 HList Result = []
25 HList context = ListTable context