Sarek_ppx_lib.Sarek_schemetype scheme = {quantified : int list;IDs of generalized (forall-bound) type variables
*)body : Sarek_types.typ;The type body with those variables
*)}A type scheme represents a polymorphic type with quantified type variables. For example, the identity function has scheme: forall a. a -> a
val mono : Sarek_types.typ -> schemeCreate a monomorphic scheme (no quantified variables)
val free_tvars : Sarek_types.typ -> int listCollect all free (unbound) type variable IDs in a type
val copy_for_scheme : int -> Sarek_types.typ -> Sarek_types.typ * int listDeep copy a type, creating fresh type variables with NEW ids for those that will be quantified. This ensures the scheme's body is completely independent of unification on the original or instantiated types.
val generalize : int -> Sarek_types.typ -> schemeGeneralize a type at a given level. Type variables at levels greater than the given level are quantified.
val instantiate : scheme -> Sarek_types.typInstantiate a type scheme by replacing quantified variables with fresh ones.
val pp_scheme : Stdlib.Format.formatter -> scheme -> unitval scheme_to_string : scheme -> stringval is_mono : scheme -> boolCheck if a scheme is monomorphic (no quantified variables)
val is_poly : scheme -> boolCheck if a scheme is polymorphic (has quantified variables)
val function_arity : scheme -> int optionGet the arity of a function scheme