MadcastSourcemadcast ty returns an annotated casting function of type ty. ty must be an arrow type.
Invalid_argument "split_arrow" if ty is not an arrow type,NoCastFound if no casting function can be derived,SeveralCastsFound if more than one casting function can be derived and none of them has a stronger priority.Exception raised when no cast can be derived for two types
Exception raised when more than cast can be derived for two types
val find_caster :
Ppxlib.Parsetree.core_type ->
Ppxlib.Parsetree.core_type ->
Ppxlib.Parsetree.expressionGiven an input type itype and an output type otype, returns a casting function of type itype -> otype.
NoCastFound if no casting function can be derived,SeveralCastsFound if more than one casting function can be derived and none of them has a stronger priority.val split_arrow :
Ppxlib.Parsetree.core_type ->
Ppxlib.Parsetree.core_type * Ppxlib.Parsetree.core_typesplit_arrow ty returns the domain and co-domain of an arrow type.
Invalid_argument "split_arrow" if ty is not an arrow typeval annotate :
Ppxlib.Parsetree.expression ->
Ppxlib.Parsetree.core_type ->
Ppxlib.Parsetree.expressionannotate expr ty returns a let expression of the form let (e : ty) = expr in e