Class: Jade::Frontend::TypeChecking::Scheme

Inherits:
Data
  • Object
show all
Defined in:
lib/jade/frontend/type_checking/scheme.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#constraintsObject (readonly)

Returns the value of attribute constraints

Returns:

  • (Object)

    the current value of constraints



4
5
6
# File 'lib/jade/frontend/type_checking/scheme.rb', line 4

def constraints
  @constraints
end

#quantifiedObject (readonly)

Returns the value of attribute quantified

Returns:

  • (Object)

    the current value of quantified



4
5
6
# File 'lib/jade/frontend/type_checking/scheme.rb', line 4

def quantified
  @quantified
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



4
5
6
# File 'lib/jade/frontend/type_checking/scheme.rb', line 4

def type
  @type
end

Class Method Details

.mono(type) ⇒ Object



13
14
15
# File 'lib/jade/frontend/type_checking/scheme.rb', line 13

def self.mono(type)
  Scheme[[], type, []]
end

Instance Method Details

#free_varsObject



9
10
11
# File 'lib/jade/frontend/type_checking/scheme.rb', line 9

def free_vars
  type.unbound_vars - quantified
end

#unbound_varsObject



5
6
7
# File 'lib/jade/frontend/type_checking/scheme.rb', line 5

def unbound_vars
  type.unbound_vars
end