add_subst!(ty, subst)
click to toggle source
def add_subst!(ty, subst)
if subst[self]
subst[self] = subst[self].union(ty)
else
subst[self] = ty
end
true
end
consistent?(_other)
click to toggle source
def consistent?(_other)
raise "should not be called: #{ self }"
end
each_free_type_variable()
click to toggle source
def each_free_type_variable
yield self
end
screen_name(scratch)
click to toggle source
def screen_name(scratch)
"Var[#{ @name }]"
end
substitute(subst, depth)
click to toggle source
def substitute(subst, depth)
if subst[self]
subst[self].limit_size(depth)
else
self
end
end