Next: utils.n
Up: Implementation
Previous: Makefile
This file includes the following utility functions for nML types:
- is_abs: Ty.ty -> bool
Whether an input type is abstracted or not.
- is_fun: Ty.ty -> bool
Whether an input type is a function type.
- is_tuple: Ty.ty -> bool
Whether an input type is a tuple type.
- has_fun: Ty.ty -> bool
Whether an input type has a function type.
- split_type: Ty.ty -> int -> Ty.ty * Ty.ty
Inputs are a function type and a number of arguments and an output is
a tuple of its input type and output type
- app_type: Ty.ty -> int -> Ty.ty
app_type t n is a resulting type after applying arguments n
times to the type t.
- is_exn: Ty.ty -> bool
Whether an input type is an exception.
- is_exn_type: Ty.ty -> bool
Whether an input type is an exception type.
- clear_type: Ty.ty -> Ty.ty
Generalize a type to a type scheme.
- unifiable: Ty.ty -> Ty.ty -> bool
Whether given two types are unifiable.
- print_ty: Ty.ty -> unit
Print a given type.
Sukyoung Ryu
2001-08-31