Shared_ast.Typetype t = Shared_ast__.Definitions.naked_typ Catala_utils.Mark.posval format : Stdlib.Format.formatter -> t -> unitmodule Map : Catala_utils.Map.S with type key = tval hash : strip:Catala_utils.Uid.Module.t option -> t -> Catala_utils.Hash.tThe strip argument strips the given leading path components in included identifiers before hashing
val is_arrow : t -> boolMatches both direct arrow types and quantified arrow types
val has_arrow : Shared_ast__.Definitions.decl_ctx -> t -> boolChecks in depth, contrary to is_arrow. Fails (with Invalid_argument) on TForAll and TClosureEnv
Handling of variables
module Var : sig ... endval free_vars : t -> Var.Set.tval free_vars_pos : t -> Catala_utils.Pos.t Var.Map.tOnly the first position where the variable appeared is kept
Removes the outermost quantifiers from the given type, if any. The returned type is guaranteed to not have the form TForAll _ and may contain free variables
Recursively unbinds nested quantifiers and merges their variables (this is similar to unquantify, but also returns the bound variables)
val forall : Var.t list -> t Bindlib.box -> Catala_utils.Pos.t -> tThe opposite of unbind: constructs a TForAll quantified type
val fresh_var : Catala_utils.Pos.t -> tval error : Catala_utils.Pos.t -> tval any : Catala_utils.Pos.t -> tdeprecated, TODO replace with fresh_var
val universal : Catala_utils.Pos.t -> tval is_universal : t -> boolval fully_known : t -> booltrue iff the type doesn't contain any unknowns (free variables or quantified types outside of arrows)