hydra.arity module
Functions dealing with arguments and arity.
-
hydra.arity.primitive_arity(prim: Primitive) → int
Find the arity (expected number of arguments) of a primitive constant or function.
-
hydra.arity.term_arity(v1: Term) → int
Find the arity (expected number of arguments) of a term.
-
hydra.arity.type_arity(v1: Type) → int
Find the arity (expected number of arguments) of a type.
-
hydra.arity.type_scheme_arity(arg_: TypeScheme) → int
Find the arity (expected number of arguments) of a type scheme.
-
hydra.arity.uncurry_type(t: Type) → Sequence[Type]
Uncurry a type expression into a list of types, turning a function type a -> b into cons a (uncurryType b).