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.
765 766 767 768 769 |
# File 'lib/dhall/typecheck.rb', line 765 def initialize(merge) @merge = merge @record = TypeChecker.for(merge.record) @union = TypeChecker.for(merge.input) end |
Instance Method Details
#annotate(context) ⇒ Object
857 858 859 860 861 862 863 864 865 |
# File 'lib/dhall/typecheck.rb', line 857 def annotate(context) amerge = AnnotatedMerge.new( merge: @merge, record: @record.annotate(context), input: @union.annotate(context) ) amerge.assert_kind(context) amerge.annotation end |