Class: Dhall::TypeChecker::Merge
- Inherits:
-
Object
- Object
- Dhall::TypeChecker::Merge
- Defined in:
- lib/dhall/typecheck.rb
Defined Under Namespace
Classes: AnnotatedMerge, Handlers
Instance Method Summary collapse
- #annotate(context) ⇒ Object
-
#initialize(merge) ⇒ Merge
constructor
A new instance of Merge.
Constructor Details
#initialize(merge) ⇒ Merge
Returns a new instance of Merge.
660 661 662 663 664 |
# File 'lib/dhall/typecheck.rb', line 660 def initialize(merge) @merge = merge @record = TypeChecker.for(merge.record) @union = TypeChecker.for(merge.input) end |
Instance Method Details
#annotate(context) ⇒ Object
752 753 754 755 756 757 758 759 760 |
# File 'lib/dhall/typecheck.rb', line 752 def annotate(context) amerge = AnnotatedMerge.new( merge: @merge, record: @record.annotate(context), input: @union.annotate(context) ) amerge.assert_kind(context) amerge.annotation end |