class Steep::TypeName::Class

def ==(other)

def ==(other)
  other.is_a?(self.class) && other.name == name && other.constructor == constructor
end

def hash

def hash
  self.class.hash ^ name.hash ^ constructor.hash
end

def initialize(name:, constructor:)

def initialize(name:, constructor:)
  super(name: name)
  @constructor = constructor
end

def map_module_name

def map_module_name
  self.class.new(name: yield(name), constructor: constructor)
end

def to_s

def to_s
  k = case constructor
      when nil
        ""
      when true
        " constructor"
      when false
        " noconstructor"
      end
  "#{name}.class#{k}"
end

def updated(constructor: NOTHING)

def updated(constructor: NOTHING)
  if NOTHING == constructor
    constructor = self.constructor
  end
  self.class.new(name: name, constructor: constructor)
end