Class: Jade::Frontend::TypeChecking::Unification::Context
- Inherits:
-
Data
- Object
- Data
- Jade::Frontend::TypeChecking::Unification::Context
- Defined in:
- lib/jade/frontend/type_checking/unification.rb
Instance Attribute Summary collapse
-
#rigid_vars ⇒ Object
readonly
Returns the value of attribute rigid_vars.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#rigid_vars ⇒ Object (readonly)
Returns the value of attribute rigid_vars
7 8 9 |
# File 'lib/jade/frontend/type_checking/unification.rb', line 7 def rigid_vars @rigid_vars end |
Class Method Details
.empty ⇒ Object
8 9 10 |
# File 'lib/jade/frontend/type_checking/unification.rb', line 8 def self.empty new([]) end |
Instance Method Details
#rigid?(type) ⇒ Boolean
12 13 14 15 |
# File 'lib/jade/frontend/type_checking/unification.rb', line 12 def rigid?(type) rigid_ids = rigid_vars.map(&:id).to_set type.unbound_vars.any? { rigid_ids.include?(it.id) } end |