Class: Dhall::TypeChecker::Merge

Inherits:
Object
  • Object
show all
Defined in:
lib/dhall/typecheck.rb

Defined Under Namespace

Classes: AnnotatedMerge, Handlers

Instance Method Summary collapse

Constructor Details

#initialize(merge) ⇒ Merge

Returns a new instance of Merge.



654
655
656
657
658
# File 'lib/dhall/typecheck.rb', line 654

def initialize(merge)
	@merge = merge
	@record = TypeChecker.for(merge.record)
	@union = TypeChecker.for(merge.input)
end

Instance Method Details

#annotate(context) ⇒ Object



746
747
748
749
750
751
752
753
754
# File 'lib/dhall/typecheck.rb', line 746

def annotate(context)
	amerge = AnnotatedMerge.new(
		merge:  @merge,
		record: @record.annotate(context),
		input:  @union.annotate(context)
	)
	amerge.assert_kind(context)
	amerge.annotation
end