Preface_specs.Closed
Closed
is a Profunctor
working on exponential types (function).
To have a predictable behaviour, the instance of Closed
must obey some laws.
Profunctor
lawscontramap_fst (fun x -> x % f) % closed = map_snd (fun x -> x % f) % closed
closed % closed = dimap uncurry curry % closed
dimap const (fun f -> f ()) % closed = id
module type WITH_CLOSED = sig ... end
Minimum interface using closed
and without Profunctor
requirements.
module type WITH_DIMAP_AND_CLOSED = sig ... end
Minimum interface using dimap
and closed
.
module type WITH_CONTRAMAP_FST_AND_MAP_SND_AND_CLOSED = sig ... end
Minimum interface using contramap_fst
and map_snd
and closed
.
module type CORE = sig ... end
Basis operations.
module type OPERATION = sig ... end
Additional operations.
module type API = sig ... end
The complete interface of a Closed Profunctor
.