package um-abt
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Module Abt.VarSource
Variables, named by strings, which can be bound to a Var.Binding or left free.
Bound variables are equal if they are have the same binding, free variables are greater than bound variables, and variables are otherwise compared lexigraphically by name.
Specifically,
compare a b is 0 iff
is_free a && is_free bandname a = name bis_bound a && is_bound band bothaandbare bound to the samebindingby way ofbind.
compare a b is String.compare (name a) (name b) if is_free a && is_free b or is_bound a && is_bound b.
compare a b is -1 if is_bound a and is_free b or 1 if is_free a and is_bound b
equal a b is true iff
is_free a && is_free bandname a = name bis_bound a && is_bound band bothaandbare bound to the samebindingby way ofbind.
bind v bnd is Some var when is_free v and name v = Binding.name bnd, where var is a new variable with the same name but bound to bnd. Otherwise, it is None.
See equal.
is_bound_to v bnd is true if v is bound to bnd, via bind
to_binding v is Some bnd iff v is bound to bnd via bind. Otherwise it is None.