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))
52 ( Recontextualize from to a1 b1
53 , Recontextualize from to a2 b2
57 => Recontextualize from to (a1, a2) (b1, b2)
61 ( Recontextualize from to a1 b1
62 , Recontextualize from to a2 b2
63 , Recontextualize from to a3 b3
64 , Labelable from, Labelable to
66 => Recontextualize from to (a1, a2, a3) (b1, b2, b3)
70 ( Recontextualize from to a1 b1
71 , Recontextualize from to a2 b2
72 , Recontextualize from to a3 b3
73 , Recontextualize from to a4 b4
74 , Labelable from, Labelable to
76 => Recontextualize from to (a1, a2, a3, a4) (b1, b2, b3, b4)
80 ( Recontextualize from to a1 b1
81 , Recontextualize from to a2 b2
82 , Recontextualize from to a3 b3
83 , Recontextualize from to a4 b4
84 , Recontextualize from to a5 b5
85 , Labelable from, Labelable to
87 => 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