pub fn infer_type<S: BuildHasher>(
expr: &Expr,
env: &HashMap<Arc<str>, ExprType, S>,
) -> Result<ExprType, TypeError>Expand description
Infer the output type of an expression given input variable types.
This performs a single pass over the expression tree, using builtin
signatures where available and falling back to ExprType::Any for
polymorphic or opaque constructs.
ยงErrors
Returns TypeError::UnboundVariable if a variable is not in the
environment.