# File lib/type_checker.rb, line 128
  def bootstrap
    @genv.add :$stdin, Type.file
    @genv.add :$stdout, Type.file
    @genv.add :$stderr, Type.file

    ObjectSpace.each_object(Class) do |klass|
      next if klass.name =~ /::/ # only 2 classes is core, but many others
      @genv.add klass.name.intern, Type.fucked
    end

    $bootstrap.each do |name,signatures|
      # FIX: Using Type.send because it must go through method_missing, not new
      signatures.each do |signature|
        lhs_type = Type.send(signature[0])
        return_type = Type.send(signature[-1])
        arg_types = signature[1..-2].map { |t| Type.send(t) }
        @functions.add_function(name, Type.function(lhs_type, arg_types, return_type))
      end
    end
  end