Preface_specs.ClosedClosed 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) % closedclosed % closed = dimap uncurry curry % closeddimap const (fun f -> f ()) % closed = idmodule type WITH_CLOSED = sig ... endMinimum interface using closed and without Profunctor requirements.
module type WITH_DIMAP_AND_CLOSED = sig ... endMinimum interface using dimap and closed.
module type WITH_CONTRAMAP_FST_AND_MAP_SND_AND_CLOSED = sig ... endMinimum interface using contramap_fst and map_snd and closed.
module type CORE = sig ... endBasis operations.
module type OPERATION = sig ... endAdditional operations.
module type API = sig ... endThe complete interface of a Closed Profunctor.