class Steep::TypeConstruction

def check(node, type, constraints: Subtyping::Constraints.empty)

def check(node, type, constraints: Subtyping::Constraints.empty)
  type_ = synthesize(node, hint: type)
  result = checker.check(
    Subtyping::Relation.new(sub_type: type_,
                            super_type: type),
    constraints: constraints
  )
  if result.failure?
    yield(type, type_, result)
  end
end