1{-# language DataKinds #-}
2{-# language FlexibleInstances #-}
3{-# language FunctionalDependencies #-}
4{-# language StandaloneKindSignatures #-}
5{-# language TypeFamilies #-}
6{-# language UndecidableInstances #-}
7{-# language UndecidableSuperClasses #-}
9module Rel8.Table.Recontextualize
15import Data.Functor.Identity ( Identity )
16import Data.Kind ( Constraint, Type )
20import Rel8.Schema.Context ( Col )
21import Rel8.Schema.Context.Label ( Labelable )
22import Rel8.Schema.HTable ( HTable )
23import qualified Rel8.Schema.Kind as K
24import Rel8.Schema.Null ( Sql )
25import Rel8.Schema.Result ( Result )
26import Rel8.Table ( Table, Congruent )
27import Rel8.Type ( DBType )
30type Recontextualize :: K.Context -> K.Context -> Type -> Type -> Constraint
35 , Recontextualize from from a a
36 , Recontextualize to to b b
37 , Recontextualize to from b a
38 ) => Recontextualize from to a b
45instance Sql DBType a => Recontextualize Result Result (Identity a) (Identity a)
48instance HTable t => Recontextualize from to (t (Col from)) (t (Col to))
54 , Congruent (t from) (t to)
55 ) => Recontextualize from to (t from) (t to)
59 ( Recontextualize from to a1 b1
60 , Recontextualize from to a2 b2
63 ) => Recontextualize from to (a1, a2) (b1, b2)
67 ( Recontextualize from to a1 b1
68 , Recontextualize from to a2 b2
69 , Recontextualize from to a3 b3
70 , Labelable from, Labelable to
71 ) => Recontextualize from to (a1, a2, a3) (b1, b2, b3)
75 ( Recontextualize from to a1 b1
76 , Recontextualize from to a2 b2
77 , Recontextualize from to a3 b3
78 , Recontextualize from to a4 b4
79 , Labelable from, Labelable to
80 ) => Recontextualize from to (a1, a2, a3, a4) (b1, b2, b3, b4)
84 ( Recontextualize from to a1 b1
85 , Recontextualize from to a2 b2
86 , Recontextualize from to a3 b3
87 , Recontextualize from to a4 b4
88 , Recontextualize from to a5 b5
89 , Labelable from, Labelable to
90 ) => Recontextualize from to (a1, a2, a3, a4, a5) (b1, b2, b3, b4, b5)
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