1{-# language DataKinds #-}
3{-# language StandaloneKindSignatures #-}
4{-# language TypeFamilies #-}
6module Rel8.Schema.HTable.Identity
15import Rel8.Schema.Dict ( Dict( Dict ) )
16import Rel8.Schema.HTable
17 ( HTable, HConstrainTable, HField
18 , hfield, htabulate, htraverse, hdicts, hspecs
20import Rel8.Schema.HTable.Context ( H, HKTable )
21import Rel8.Schema.Spec ( Context, Spec, KnownSpec, specSing )
24type HIdentity :: Spec -> HKTable
25data HIdentity spec context where
27 { unHIdentity :: context spec
28 } -> HIdentity spec (H context)
31type HIdentityField :: Spec -> Context
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