Module: Jade::Frontend::TypeChecking::Inference::Helpers

Instance Method Summary collapse

Instance Method Details

#check(node, registry, env, expected_type) ⇒ Object



23
24
25
# File 'lib/jade/frontend/type_checking/inference/helpers.rb', line 23

def check(node, registry, env, expected_type)
  TypeChecking.check_node(node, registry, env, expected_type)
end

#generalize(env, type, constraints = []) ⇒ Object



19
20
21
# File 'lib/jade/frontend/type_checking/inference/helpers.rb', line 19

def generalize(env, type, constraints = [])
  Generalization.generalize(env, type, constraints)
end

#instantiate(scheme, var_gen) ⇒ Object



15
16
17
# File 'lib/jade/frontend/type_checking/inference/helpers.rb', line 15

def instantiate(scheme, var_gen)
  Instantiation.instantiate(scheme, var_gen)
end

#type_from_symbol(symbol, registry, var_gen) ⇒ Object



27
28
29
# File 'lib/jade/frontend/type_checking/inference/helpers.rb', line 27

def type_from_symbol(symbol, registry, var_gen)
  Type.from_symbol(symbol, registry, var_gen)
end

#unify(actual, expected) ⇒ Object



11
12
13
# File 'lib/jade/frontend/type_checking/inference/helpers.rb', line 11

def unify(actual, expected)
  Unification.unify(actual, expected)
end