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.Opaque ( Opaque )
21import Rel8.Schema.Context ( Col )
22import Rel8.Schema.Context.Label ( Labelable )
23import Rel8.Schema.HTable ( HTable )
24import qualified Rel8.Schema.Kind as K
25import Rel8.Schema.Nullability ( Sql )
26import Rel8.Schema.Spec ( KnownSpec )
27import Rel8.Table ( Table, Congruent )
28import Rel8.Type ( DBType )
31type Recontextualize :: K.Context -> K.Context -> Type -> Type -> Constraint
36 , Recontextualize from from a a
37 , Recontextualize to to b b
38 , Recontextualize to from b a
39 ) => Recontextualize from to a b
46instance KnownSpec spec =>
47 Recontextualize from to (Col from spec) (Col to spec)
51instance Sql DBType a =>
52 Recontextualize Aggregate Insertion (Aggregate (Expr a)) (Insertion a)
55instance Sql DBType a => Recontextualize Expr Insertion (Expr a) (Insertion a)
59instance Sql DBType a => Recontextualize Identity Identity (Identity a) (Identity a)
63instance Sql DBType a =>
64 Recontextualize Identity Insertion (Identity a) (Insertion a)
67instance Sql DBType a =>
68 Recontextualize Insertion Aggregate (Insertion a) (Aggregate (Expr a))
71instance Sql DBType a => Recontextualize Insertion Expr (Insertion a) (Expr a)
74instance Sql DBType a =>
75 Recontextualize Insertion Identity (Insertion a) (Identity a)
78instance Sql DBType a => Recontextualize Insertion Insertion (Insertion a) (Insertion a)
81instance Sql DBType a => Recontextualize Insertion Name (Insertion a) (Name a)
84instance Sql DBType a => Recontextualize Name Insertion (Name a) (Insertion a)
88instance Recontextualize from to (Opaque from a) (Opaque to a)
91instance HTable t => Recontextualize from to (t (Col from)) (t (Col to))
97 , Congruent (t from) (t to)
98 ) => Recontextualize from to (t from) (t to)
102 ( Recontextualize from to a1 b1
103 , Recontextualize from to a2 b2
106 ) => Recontextualize from to (a1, a2) (b1, b2)
110 ( Recontextualize from to a1 b1
111 , Recontextualize from to a2 b2
112 , Recontextualize from to a3 b3
113 , Labelable from, Labelable to
114 ) => Recontextualize from to (a1, a2, a3) (b1, b2, b3)
118 ( Recontextualize from to a1 b1
119 , Recontextualize from to a2 b2
120 , Recontextualize from to a3 b3
121 , Recontextualize from to a4 b4
122 , Labelable from, Labelable to
123 ) => Recontextualize from to (a1, a2, a3, a4) (b1, b2, b3, b4)
127 ( Recontextualize from to a1 b1
128 , Recontextualize from to a2 b2
129 , Recontextualize from to a3 b3
130 , Recontextualize from to a4 b4
131 , Recontextualize from to a5 b5
132 , Labelable from, Labelable to
133 ) => 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