@@ -1,10 +1,12 @@
1{-# language DataKinds #-}
1{-# language DataKinds #-}
2{-# language GADTs #-}
2{-# language GADTs #-}
3+{-# language PatternSynonyms #-}
3{-# language StandaloneKindSignatures #-}
4{-# language StandaloneKindSignatures #-}
4{-# language TypeFamilies #-}
5{-# language TypeFamilies #-}
6module Rel8.Schema.HTable.Identity
7module Rel8.Schema.HTable.Identity
7− ( HIdentity(..)
8+ ( HIdentity( HIdentity, HType, unHIdentity )
@@ -13,13 +15,23 @@ import Data.Kind ( Type )
13import Prelude
15import Prelude
18+import Rel8.Kind.Necessity ( Necessity( Required ) )
16import Rel8.Schema.Dict ( Dict( Dict ) )
19import Rel8.Schema.Dict ( Dict( Dict ) )
17import Rel8.Schema.HTable
20import Rel8.Schema.HTable
18 ( HTable, HConstrainTable, HField
21 ( HTable, HConstrainTable, HField
19 , hfield, htabulate, htraverse, hdicts, hspecs
22 , hfield, htabulate, htraverse, hdicts, hspecs
21import qualified Rel8.Schema.Kind as K
24import qualified Rel8.Schema.Kind as K
22−import Rel8.Schema.Spec ( Spec, KnownSpec, specSing )
25+import Rel8.Schema.Spec ( Spec( Spec ), KnownSpec, specSing )
28+type HType :: Type -> K.HTable
29+type HType a = HIdentity ('Spec '[] 'Required a)
32+pattern HType :: context ('Spec '[] 'Required a) -> HType a context
33+pattern HType a = HIdentity a
34+{-# COMPLETE HType #-}
25type HIdentity :: Spec -> K.HTable
37type HIdentity :: Spec -> K.HTable