In Files

  • typeprof-0.12.0/lib/typeprof/type.rb

Class/Module Index [+]

Quicksearch

Var

Public Class Methods

new(name) click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/type.rb, line 427
def initialize(name)
  @name = name
end
            

Public Instance Methods

add_subst!(ty, subst) click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/type.rb, line 451
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.12.0/lib/typeprof/type.rb, line 447
def consistent?(_other)
  raise "should not be called: #{ self }"
end
            
each_free_type_variable() click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/type.rb, line 435
def each_free_type_variable
  yield self
end
            
screen_name(scratch) click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/type.rb, line 431
def screen_name(scratch)
  "Var[#{ @name }]"
end
            
substitute(subst, depth) click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/type.rb, line 439
def substitute(subst, depth)
  if subst[self]
    subst[self].limit_size(depth)
  else
    self
  end
end