Sha256: dd5c12d5173c3fae3eb0b925d5bd16b3f1204851a1bae8414812afee0fac65e4

Contents?: true

Size: 538 Bytes

Versions: 3

Compression:

Stored size: 538 Bytes

Contents

module Steep
  module AST
    module Types
      class Top
        attr_reader :location

        def initialize(location: nil)
          @location = location
        end

        def ==(other)
          other.is_a?(Top)
        end

        def hash
          self.class.hash
        end

        alias eql? ==

        def subst(s)
          self
        end

        def to_s
          "⟙"
        end

        def free_variables
          Set.new
        end

        def level
          [2]
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
steep-0.3.0 lib/steep/ast/types/top.rb
steep-0.2.0 lib/steep/ast/types/top.rb
steep-0.1.0 lib/steep/ast/types/top.rb