module M:functor (
X
:
sig
type
'a
tThis functor is essentially there because we use this same interface in different contexts, with different types for'a t
.1) One use case for it is where
'a X.t = 'a Typerep.t
. These interfaces are then part of the type witness built for a type containing a record or a variant in its structure.traverse
will give a way of accessing the type representation for the arguments of a variant or record type.2) Another use case is for building "staged generic computations". In that case, the type
'a X.t
is the type of the computation that is being built.traverse
returns the computation built for the argument. The interface no longer exports the typerep of the arguments in hopes of enforcing that no typerep traversal happens at runtime if the computation happen to be a function.
end
) ->
sig
..end
Parameters: |
|
module Tag_internal:sig
..end
module Tag:sig
..end
module Variant_internal:sig
..end
module Variant:sig
..end
module Field_internal:sig
..end
module Field:sig
..end
module Record_internal:sig
..end
module Record:sig
..end