on c6ffdab help sign in
32 lines 871 B history raw
1{-# language DataKinds #-}
2{-# language DeriveAnyClass #-}
3{-# language DeriveGeneric #-}
4{-# language DerivingStrategies #-}
5{-# language StandaloneKindSignatures #-}
7module Rel8.Schema.HTable.Either
8 ( HEitherTable(..)
9 )
10where
12-- base
13import GHC.Generics ( Generic )
14import Prelude ()
16-- rel8
17import Rel8.Schema.HTable ( HTable )
18import Rel8.Schema.HTable.Identity ( HType )
19import Rel8.Schema.HTable.Label ( HLabel )
20import Rel8.Schema.HTable.Nullify ( HNullify )
21import qualified Rel8.Schema.Kind as K
22import Rel8.Type.Tag ( EitherTag )
25type HEitherTable :: K.HTable -> K.HTable -> K.HTable
26data HEitherTable left right context = HEitherTable
27 { htag :: HLabel "isRight" (HType EitherTag) context
28 , hleft :: HLabel "Left" (HNullify left) context
29 , hright :: HLabel "Right" (HNullify right) context
30 }
31 deriving stock Generic
32 deriving anyclass HTable