def add_type( type )
      hash = type.hash
      raise "upps #{hash} #{hash.class}" unless hash.is_a?(::Integer)
      was = types[hash]
      return was if was
      types[hash] = type
    end
def add_type( type )
      hash = type.hash
      raise "upps #{hash} #{hash.class}" unless hash.is_a?(::Integer)
      was = types[hash]
      return was if was
      types[hash] = type
    end
add a type, meaning the instance given must be a valid type