Algebraic.LocatedSourcemodule S : Ppxlib.Ast_builder.Sval encode :
('a, 'b) Algebraic_intf.Typ.t ->
subderive:('a -> ('b, 'e) M.t) ->
lib:string option ->
type_name:string ->
'a list ->
(Ppxlib.expression, 'e) M.tBuild the functional encoding of a composite type. Combine the various elements necessary for a functional encoding of a composite type ('a, 'b) {!typ}, in terms its components of type 'a list and the name of the composite type type_name.
This requires a function subderive for deriving the type representation of the subcomponents, which may run in a monadic context M.t.