0 | module Data.CT.DependentAction.Instances
2 | import Data.CT.Category.Definition
3 | import Data.CT.Category.Instances
4 | import Data.CT.Functor.Definition
5 | import Data.CT.Functor.Instances
6 | import Data.CT.DependentAction.Definition
8 | import Data.Container.Base
9 | import Data.Container.Additive
13 | PairType : DepAct TypeCat (Const {c=TypeCat})
14 | PairType = MkDepAct $
\x => MkFunctor
16 | (\r, (x, p) => (x, r p))
21 | DPairType : DepAct TypeCat (FamIndCat {c=TypeCat})
22 | DPairType = MkDepAct $
\x => MkFunctor
24 | (\r, (
x ** p)
=> (
x ** r x p)
)
28 | PairCont : DepAct DLens (Const {c=DLens})
29 | PairCont = MkDepAct $
\c => MkFunctor
34 | DPairCont : DepAct DLens (FamDLens {c=DLens})
35 | DPairCont = MkDepAct $
\c => MkFunctor
36 | (DepHancockProduct c)
37 | (\r => !% \(
x ** p)
=> ((
x ** (r x).fwd p)
**
38 | \(x', p') => (x', (r x).bwd p p'))
)
43 | PairAddCont : DepAct AddDLens (Const {c=AddDLens})
44 | PairAddCont = MkDepAct $
\c => MkFunctor
49 | DPairAddCont : DepAct AddDLens (FamAddDLens {c=AddDLens})
50 | DPairAddCont = MkDepAct $
\c => MkFunctor
51 | (DepHancockProduct c)
52 | (\r => !%+ \(
x ** p)
=> ((
x ** (r x).fwd p)
**
53 | \(x', p') => (x', (r x).bwd p p'))
)