class TypeProf::Type::Var
Public Class Methods
new(name)
click to toggle source
# File typeprof-0.21.3/lib/typeprof/type.rb, line 448 def initialize(name) @name = name end
Public Instance Methods
add_subst!(ty, subst)
click to toggle source
# File typeprof-0.21.3/lib/typeprof/type.rb, line 472 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
# File typeprof-0.21.3/lib/typeprof/type.rb, line 468 def consistent?(_other) raise "should not be called: #{ self }" end
each_free_type_variable() { |self| ... }
click to toggle source
# File typeprof-0.21.3/lib/typeprof/type.rb, line 456 def each_free_type_variable yield self end
screen_name(scratch)
click to toggle source
# File typeprof-0.21.3/lib/typeprof/type.rb, line 452 def screen_name(scratch) "Var[#{ @name }]" end
substitute(subst, depth)
click to toggle source
# File typeprof-0.21.3/lib/typeprof/type.rb, line 460 def substitute(subst, depth) if subst[self] subst[self].limit_size(depth) else self end end