on 4475085 help sign in
35 lines 1.1 kB history raw
1{-# language DataKinds #-}
2{-# language DeriveAnyClass #-}
3{-# language DeriveGeneric #-}
4{-# language DerivingStrategies #-}
5{-# language StandaloneKindSignatures #-}
7module Rel8.Schema.HTable.These
8 ( HTheseTable(..)
9 )
10where
12-- base
13import GHC.Generics ( Generic )
14import Prelude
16-- rel8
17import Rel8.Kind.Necessity ( Necessity( Required ) )
18import Rel8.Schema.HTable ( HTable )
19import Rel8.Schema.HTable.Identity ( HIdentity )
20import Rel8.Schema.HTable.Label ( HLabel )
21import Rel8.Schema.HTable.Nullify ( HNullify )
22import qualified Rel8.Schema.Kind as K
23import Rel8.Schema.Spec ( Spec( Spec ) )
24import Rel8.Type.Tag ( MaybeTag )
27type HTheseTable :: K.HTable -> K.HTable -> K.HTable
28data HTheseTable here there context = HTheseTable
29 { hhereTag :: HIdentity ('Spec '["hasHere"] 'Required (Maybe MaybeTag)) context
30 , hhere :: HLabel "Here" (HNullify here) context
31 , hthereTag :: HIdentity ('Spec '["hasThere"] 'Required (Maybe MaybeTag)) context
32 , hthere :: HLabel "There" (HNullify there) context
33 }
34 deriving stock Generic
35 deriving anyclass HTable