constrain: Generate Type Constraint Set from Expression

Description Usage Arguments Value

View source: R/constrain.R

Description

This function generates a set of type constraints from the given expression, which can then be solved to infer types for the expression.

Usage

1
constrain(node, map = SymbolMap())

Arguments

node

(ASTNode) An expression from which to generate type constraints.

map

(SymbolMap) A mapping between program variables and type variables.

Value

An S4 Result object, with slots contraints and map. The former is the list of constraints, and the latter is the mapping between program variables and type variables.


duncantl/RTypeInference documentation built on Jan. 16, 2021, 12:30 a.m.