Class: Dhall::TypeChecker::RecordSelection
- Inherits:
-
Object
- Object
- Dhall::TypeChecker::RecordSelection
- Defined in:
- lib/dhall/typecheck.rb
Defined Under Namespace
Classes: Selector, TypeSelector
Instance Method Summary collapse
- #annotate(context) ⇒ Object
-
#initialize(selection) ⇒ RecordSelection
constructor
A new instance of RecordSelection.
Constructor Details
#initialize(selection) ⇒ RecordSelection
Returns a new instance of RecordSelection.
582 583 584 585 586 |
# File 'lib/dhall/typecheck.rb', line 582 def initialize(selection) @selection = selection @record = selection.record @selector = selection.selector end |
Instance Method Details
#annotate(context) ⇒ Object
620 621 622 623 624 625 626 627 628 |
# File 'lib/dhall/typecheck.rb', line 620 def annotate(context) arecord = TypeChecker.for(@record).annotate(context) selector = Selector.for(arecord) Dhall::TypeAnnotation.new( value: @selection.with(record: arecord), type: selector.select(@selector) ) end |