on da76712 help sign in
rel8/src/Rel8/Column/These.hs
29 lines 715 B history raw
1{-# language DataKinds #-}
2{-# language StandaloneKindSignatures #-}
3{-# language TypeFamilyDependencies #-}
5module Rel8.Column.These
6 ( HThese
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.These ( TheseTable )
19-- these
20import Data.These ( These )
23-- | Nest an 'These' value within a 'Rel8able'. @HThese f a b@ will produce a
24-- 'TheseTable' @a b@ in the 'Expr' context, and a 'These' @a b@ in the
25-- 'Result' context.
26type HThese :: K.Context -> Type -> Type -> Type
27type family HThese context = these | these -> context where
28 HThese Result = These
29 HThese context = TheseTable context