class Steep::AST::Types::Name::Applying
def ==(other)
def ==(other) other.class == self.class && other.name == name && other.args == args end
def free_variables
def free_variables args.each.with_object(Set.new) do |type, vars| vars.merge(type.free_variables) end end
def hash
def hash self.class.hash ^ name.hash ^ args.hash end
def initialize(name:, args:, location: nil)
def initialize(name:, args:, location: nil) super(name: name, location: location) @args = args end
def level
def level [0] + level_of_children(args) end
def subst(s)
def subst(s) self.class.new(location: location, name: name, args: args.map {|a| a.subst(s) }) end
def to_s
def to_s if args.empty? "#{name}" else "#{name}[#{args.join(", ")}]" end end
def with_location(new_location)
def with_location(new_location) self.class.new(name: name, args: args, location: new_location) end