{-# language DataKinds #-}
{-# language LambdaCase #-}
{-# language MultiParamTypeClasses #-}
{-# language StandaloneKindSignatures #-}
{-# language TypeFamilies #-}
module Rel8.Column.Lift
( Lift, ALift(..)
)
where
import Data.Kind ( Type )
import Prelude
import Rel8.Generic.Rel8able ( GColumns )
import Rel8.Kind.Context ( Reifiable(..), SContext(..) )
import Rel8.Schema.Context ( Col )
import qualified Rel8.Schema.Kind as K
import Rel8.Schema.Reify ( Reify, hreify, hunreify )
import Rel8.Schema.Result ( Result )
import Rel8.Table
( Table, Columns, Context, fromColumns, toColumns
, Unreify, reify, unreify
)
import Rel8.Table.Rel8able ()
import Rel8.Table.HKD ( HKD( HKD ), HKDable, fromHKD, toHKD )
import Rel8.Table.Recontextualize ( Recontextualize )
type Lift :: K.Context -> Type -> Type
type family Lift context a where
Lift (Reify context) a = ALift context a
Lift Result a = a
Lift context a = HKD a context
type ALift :: K.Context -> Type -> Type
newtype ALift context a = ALift
{ ALift context a -> Lift context a
unALift :: Lift context a
}
instance (Reifiable context, HKDable a) =>
Table (Reify context) (ALift context a)
where
type Context (ALift context a) = Reify context
type Columns (ALift context a) = GColumns (HKD a)
type Unreify (ALift context a) = Lift context a
fromColumns :: Columns (ALift context a) (Col (Reify context)) -> ALift context a
fromColumns = SContext context
-> GColumns (HKD a) (Col (Reify context)) -> ALift context a
forall a (context :: Context).
HKDable a =>
SContext context
-> GColumns (HKD a) (Col (Reify context)) -> ALift context a
sfromColumnsLift SContext context
forall (context :: Context). Reifiable context => SContext context
contextSing
toColumns :: ALift context a -> Columns (ALift context a) (Col (Reify context))
toColumns = SContext context
-> ALift context a -> GColumns (HKD a) (Col (Reify context))
forall a (context :: Context).
HKDable a =>
SContext context
-> ALift context a -> GColumns (HKD a) (Col (Reify context))
stoColumnsLift SContext context
forall (context :: Context). Reifiable context => SContext context
contextSing
reify :: (Reify context :~: Reify ctx)
-> Unreify (ALift context a) -> ALift context a
reify Reify context :~: Reify ctx
_ = Unreify (ALift context a) -> ALift context a
forall (context :: Context) a. Lift context a -> ALift context a
ALift
unreify :: (Reify context :~: Reify ctx)
-> ALift context a -> Unreify (ALift context a)
unreify Reify context :~: Reify ctx
_ (ALift Lift context a
a) = Unreify (ALift context a)
Lift context a
a
instance (Reifiable context, Reifiable context', HKDable a) =>
Recontextualize
(Reify context)
(Reify context')
(ALift context a)
(ALift context' a)
sfromColumnsLift :: HKDable a
=> SContext context
-> GColumns (HKD a) (Col (Reify context))
-> ALift context a
sfromColumnsLift :: SContext context
-> GColumns (HKD a) (Col (Reify context)) -> ALift context a
sfromColumnsLift = \case
SContext context
SAggregate -> HKD a Aggregate -> ALift context a
forall (context :: Context) a. Lift context a -> ALift context a
ALift (HKD a Aggregate -> ALift context a)
-> (Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Aggregate))
-> HKD a Aggregate)
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Aggregate))
-> ALift context a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Aggregate)
-> HKD a Aggregate
forall (context :: Context) a.
Table context a =>
Columns a (Col context) -> a
fromColumns (Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Aggregate)
-> HKD a Aggregate)
-> (Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Aggregate))
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Aggregate))
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Aggregate))
-> HKD a Aggregate
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Aggregate))
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Aggregate)
forall (t :: HTable) (context :: Context).
HTable t =>
t (Col (Reify context)) -> t (Col context)
hunreify
SContext context
SExpr -> HKD a Expr -> ALift context a
forall (context :: Context) a. Lift context a -> ALift context a
ALift (HKD a Expr -> ALift context a)
-> (Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Expr))
-> HKD a Expr)
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Expr))
-> ALift context a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Expr)
-> HKD a Expr
forall (context :: Context) a.
Table context a =>
Columns a (Col context) -> a
fromColumns (Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Expr)
-> HKD a Expr)
-> (Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Expr))
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Expr))
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Expr))
-> HKD a Expr
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Expr))
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Expr)
forall (t :: HTable) (context :: Context).
HTable t =>
t (Col (Reify context)) -> t (Col context)
hunreify
SContext context
SInsert -> HKD a Insert -> ALift context a
forall (context :: Context) a. Lift context a -> ALift context a
ALift (HKD a Insert -> ALift context a)
-> (Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Insert))
-> HKD a Insert)
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Insert))
-> ALift context a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Insert)
-> HKD a Insert
forall (context :: Context) a.
Table context a =>
Columns a (Col context) -> a
fromColumns (Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Insert)
-> HKD a Insert)
-> (Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Insert))
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Insert))
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Insert))
-> HKD a Insert
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Insert))
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Insert)
forall (t :: HTable) (context :: Context).
HTable t =>
t (Col (Reify context)) -> t (Col context)
hunreify
SContext context
SName -> HKD a Name -> ALift context a
forall (context :: Context) a. Lift context a -> ALift context a
ALift (HKD a Name -> ALift context a)
-> (Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Name))
-> HKD a Name)
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Name))
-> ALift context a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Name)
-> HKD a Name
forall (context :: Context) a.
Table context a =>
Columns a (Col context) -> a
fromColumns (Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Name)
-> HKD a Name)
-> (Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Name))
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Name))
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Name))
-> HKD a Name
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Name))
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Name)
forall (t :: HTable) (context :: Context).
HTable t =>
t (Col (Reify context)) -> t (Col context)
hunreify
SContext context
SResult -> a -> ALift context a
forall (context :: Context) a. Lift context a -> ALift context a
ALift (a -> ALift context a)
-> (Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Result))
-> a)
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Result))
-> ALift context a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. HKD a Result -> a
forall a. HKDable a => HKD a Result -> a
fromHKD (HKD a Result -> a)
-> (Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Result))
-> HKD a Result)
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Result))
-> a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Result)
-> HKD a Result
forall a (f :: Context). GColumnsHKD a (Col f) -> HKD a f
HKD (Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Result)
-> HKD a Result)
-> (Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Result))
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Result))
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Result))
-> HKD a Result
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Result))
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Result)
forall (t :: HTable) (context :: Context).
HTable t =>
t (Col (Reify context)) -> t (Col context)
hunreify
SReify SContext context
context -> ALift context a -> ALift context a
forall (context :: Context) a. Lift context a -> ALift context a
ALift (ALift context a -> ALift context a)
-> (Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify (Reify context)))
-> ALift context a)
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify (Reify context)))
-> ALift context a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SContext context
-> GColumns (HKD a) (Col (Reify context)) -> ALift context a
forall a (context :: Context).
HKDable a =>
SContext context
-> GColumns (HKD a) (Col (Reify context)) -> ALift context a
sfromColumnsLift SContext context
context (Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify context))
-> ALift context a)
-> (Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify (Reify context)))
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify context)))
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify (Reify context)))
-> ALift context a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify (Reify context)))
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify context))
forall (t :: HTable) (context :: Context).
HTable t =>
t (Col (Reify context)) -> t (Col context)
hunreify
stoColumnsLift :: HKDable a
=> SContext context
-> ALift context a
-> GColumns (HKD a) (Col (Reify context))
stoColumnsLift :: SContext context
-> ALift context a -> GColumns (HKD a) (Col (Reify context))
stoColumnsLift = \case
SContext context
SAggregate -> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Aggregate)
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Aggregate))
forall (t :: HTable) (context :: Context).
HTable t =>
t (Col context) -> t (Col (Reify context))
hreify (Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Aggregate)
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Aggregate)))
-> (ALift context a
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Aggregate))
-> ALift context a
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Aggregate))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. HKD a Aggregate
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Aggregate)
forall (context :: Context) a.
Table context a =>
a -> Columns a (Col context)
toColumns (HKD a Aggregate
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Aggregate))
-> (ALift context a -> HKD a Aggregate)
-> ALift context a
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Aggregate)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ALift context a -> HKD a Aggregate
forall (context :: Context) a. ALift context a -> Lift context a
unALift
SContext context
SExpr -> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Expr)
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Expr))
forall (t :: HTable) (context :: Context).
HTable t =>
t (Col context) -> t (Col (Reify context))
hreify (Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Expr)
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Expr)))
-> (ALift context a
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Expr))
-> ALift context a
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Expr))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. HKD a Expr
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Expr)
forall (context :: Context) a.
Table context a =>
a -> Columns a (Col context)
toColumns (HKD a Expr
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Expr))
-> (ALift context a -> HKD a Expr)
-> ALift context a
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Expr)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ALift context a -> HKD a Expr
forall (context :: Context) a. ALift context a -> Lift context a
unALift
SContext context
SInsert -> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Insert)
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Insert))
forall (t :: HTable) (context :: Context).
HTable t =>
t (Col context) -> t (Col (Reify context))
hreify (Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Insert)
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Insert)))
-> (ALift context a
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Insert))
-> ALift context a
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Insert))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. HKD a Insert
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Insert)
forall (context :: Context) a.
Table context a =>
a -> Columns a (Col context)
toColumns (HKD a Insert
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Insert))
-> (ALift context a -> HKD a Insert)
-> ALift context a
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Insert)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ALift context a -> HKD a Insert
forall (context :: Context) a. ALift context a -> Lift context a
unALift
SContext context
SName -> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Name)
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Name))
forall (t :: HTable) (context :: Context).
HTable t =>
t (Col context) -> t (Col (Reify context))
hreify (Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Name)
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Name)))
-> (ALift context a
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Name))
-> ALift context a
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Name))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. HKD a Name
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Name)
forall (context :: Context) a.
Table context a =>
a -> Columns a (Col context)
toColumns (HKD a Name
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Name))
-> (ALift context a -> HKD a Name)
-> ALift context a
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Name)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ALift context a -> HKD a Name
forall (context :: Context) a. ALift context a -> Lift context a
unALift
SContext context
SResult -> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Result)
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Result))
forall (t :: HTable) (context :: Context).
HTable t =>
t (Col context) -> t (Col (Reify context))
hreify (Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Result)
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Result)))
-> (ALift context a
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Result))
-> ALift context a
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify Result))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (\(HKD Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Result)
a) -> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Result)
a) (HKD a Result
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Result))
-> (ALift context a -> HKD a Result)
-> ALift context a
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col Result)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> HKD a Result
forall a. HKDable a => a -> HKD a Result
toHKD (a -> HKD a Result)
-> (ALift context a -> a) -> ALift context a -> HKD a Result
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ALift context a -> a
forall (context :: Context) a. ALift context a -> Lift context a
unALift
SReify SContext context
context -> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify context))
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify (Reify context)))
forall (t :: HTable) (context :: Context).
HTable t =>
t (Col context) -> t (Col (Reify context))
hreify (Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify context))
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify (Reify context))))
-> (ALift context a
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify context)))
-> ALift context a
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify (Reify context)))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SContext context
-> ALift context a -> GColumns (HKD a) (Col (Reify context))
forall a (context :: Context).
HKDable a =>
SContext context
-> ALift context a -> GColumns (HKD a) (Col (Reify context))
stoColumnsLift SContext context
context (ALift context a
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify context)))
-> (ALift context a -> ALift context a)
-> ALift context a
-> Eval
(GGColumns
(GAlgebra (Rep a))
TColumns
(GRecord (GMap (TColumn (Reify Result)) (Rep a))))
(Col (Reify context))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ALift context a -> ALift context a
forall (context :: Context) a. ALift context a -> Lift context a
unALift