1{-# language DataKinds #-}
3{-# language StandaloneKindSignatures #-}
4{-# language TypeFamilies #-}
6module Rel8.Schema.HTable.Identity
12import Data.Kind ( Type )
16import Rel8.Schema.Dict ( Dict( Dict ) )
17import Rel8.Schema.HTable
18 ( HTable, HConstrainTable, HField
19 , hfield, htabulate, htraverse, hdicts, hspecs
21import qualified Rel8.Schema.Kind as K
22import Rel8.Schema.Spec ( Spec, KnownSpec, specSing )
25type HIdentity :: Spec -> K.HTable
26newtype HIdentity spec context = HIdentity
27 { unHIdentity :: context spec
31type HIdentityField :: Spec -> Spec -> Type
32data HIdentityField _spec spec where
33 HIdentityField :: HIdentityField spec spec
36instance KnownSpec spec => HTable (HIdentity spec) where
37 type HConstrainTable (HIdentity spec) c = c spec
38 type HField (HIdentity spec) = HIdentityField spec
40 hfield (HIdentity a) HIdentityField = a
41 htabulate f = HIdentity $ f HIdentityField
42 htraverse f (HIdentity a) = HIdentity <$> f a
43 hdicts = HIdentity Dict
44 hspecs = HIdentity specSing
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list