record Container : Type
MkContainer : (Shape : Type) -> (Shape -> Type) -> Container
.Position : ({rec:0} : Container) -> Shape {rec:0} -> Type
.Shape : Container -> Type
Functor (Extension c)
.Shape : Container -> Type
Shape : Container -> Type
.Position : ({rec:0} : Container) -> Shape {rec:0} -> Type
Position : ({rec:0} : Container) -> Shape {rec:0} -> Type
record Extension : Container -> Type -> Type
MkExtension : (shape : Shape c) -> (Position c shape -> x) -> Extension c x
.payloads : ({rec:0} : Extension c x) -> Position c (shape {rec:0}) -> x
.shape : Extension c x -> Shape c
Functor (Extension c)
.shape : Extension c x -> Shape c
shape : Extension c x -> Shape c
.payloads : ({rec:0} : Extension c x) -> Position c (shape {rec:0}) -> x
payloads : ({rec:0} : Extension c x) -> Position c (shape {rec:0}) -> x
record Morphism : Container -> Container -> Type
MkMorphism : (shapeMorphism : (Shape c -> Shape d)) -> (Position d (shapeMorphism s) -> Position c s) -> Morphism c d
.positionMorphism : ({rec:0} : Morphism c d) -> Position d (shapeMorphism {rec:0} s) -> Position c s
.shapeMorphism : Morphism c d -> Shape c -> Shape d
.shapeMorphism : Morphism c d -> Shape c -> Shape d
shapeMorphism : Morphism c d -> Shape c -> Shape d
.positionMorphism : ({rec:0} : Morphism c d) -> Position d (shapeMorphism {rec:0} s) -> Position c s
positionMorphism : ({rec:0} : Morphism c d) -> Position d (shapeMorphism {rec:0} s) -> Position c s
Extension : Morphism c d -> Extension c x -> Extension d x
Const : Type -> Container
toConst : k -> Extension (Const k) x
fromConst : Extension (Const k) x -> k
Identity : Container
toIdentity : x -> Extension Identity x
fromIdentity : Extension Identity x -> x
Compose : Container -> Container -> Container
toCompose : (.) (Extension d) (Extension c) x -> Extension (Compose d c) x
fromCompose : Extension (Compose d c) x -> (.) (Extension d) (Extension c) x
Sum : Container -> Container -> Container
toSum : Either (Extension c x) (Extension d x) -> Extension (Sum c d) x
fromSum : Extension (Sum c d) x -> Either (Extension c x) (Extension d x)
Pair : Container -> Container -> Container
toPair : (Extension c x, Extension d x) -> Extension (Pair c d) x
fromPair : Extension (Pair c d) x -> (Extension c x, Extension d x)
Exponential : Type -> Container -> Container
toExponential : (k -> Extension c x) -> Extension (Exponential k c) x
fromExponential : Extension (Exponential k c) x -> k -> Extension c x
data W : Container -> Type
MkW : Extension c (W c) -> W c
map : Morphism c d -> W c -> W d
foldr : (Extension c x -> x) -> W c -> x
para : (Extension c (x, W c) -> x) -> W c -> x
record Free : Container -> Type -> Type
@Free@ is a wrapper around @W@ to make it inference friendly.
Without this wrapper, neither @pure@ nor @bind@ are able to infer their @c@ argument.
MkFree : W (Sum c (Const x)) -> Free c x
.runFree : Free c x -> W (Sum c (Const x))
.runFree : Free c x -> W (Sum c (Const x))
runFree : Free c x -> W (Sum c (Const x))
pure : x -> Free c x
(>>=) : Free c x -> (x -> Free c y) -> Free c y
join : Free c (Free c x) -> Free c x
data M : Container -> Type
MkM : Extension c (Inf (M c)) -> M c
unfoldr : (s -> Extension c s) -> s -> M c
record Cofree : Container -> Type -> Type
@Cofree@ is a wrapper around @M@ to make it inference friendly.
Without this wrapper, neither @extract@ nor @extend@ are able to infer their @c@ argument.
MkCofree : M (Pair (Const x) c) -> Cofree c x
.runCofree : Cofree c x -> M (Pair (Const x) c)
.runCofree : Cofree c x -> M (Pair (Const x) c)
runCofree : Cofree c x -> M (Pair (Const x) c)
extract : Cofree c x -> x
extend : (Cofree c a -> b) -> Cofree c a -> Cofree c b
duplicate : Cofree c a -> Cofree c (Cofree c a)
Derivative : Container -> Container
hole : (v : Extension (Derivative c) x) -> Position c (fst (shape v))
unplug : (v : Extension c x) -> Position c (shape v) -> (Extension (Derivative c) x, x)
plug : (v : Extension (Derivative c) x) -> DecEq (Position c (fst (shape v))) => x -> Extension c x
toConst : Extension (Const Void) x -> Extension (Derivative (Const k)) x
fromConst : Extension (Derivative (Const k)) x -> Extension (Const Void) x
toIdentity : Extension (Derivative Identity) x
toSum : Extension (Sum (Derivative c) (Derivative d)) x -> Extension (Derivative (Sum c d)) x
fromSum : Extension (Derivative (Sum c d)) x -> Extension (Sum (Derivative c) (Derivative d)) x
toPair : Extension (Sum (Pair (Derivative c) d) (Pair c (Derivative d))) x -> Extension (Derivative (Pair c d)) x
fromPair : Extension (Derivative (Pair c d)) x -> Extension (Sum (Pair (Derivative c) d) (Pair c (Derivative d))) x
fromCompose : Extension (Derivative (Compose c d)) x -> Extension (Pair (Derivative d) (Compose (Derivative c) d)) x
toCompose : ((s : c .Shape) -> DecEq (Position c s)) -> ((s : d .Shape) -> DecEq (Position d s)) -> Extension (Pair (Derivative d) (Compose (Derivative c) d)) x -> Extension (Derivative (Compose c d)) x