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.



725
726
727
728
729
# File 'lib/dhall/typecheck.rb', line 725

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

Instance Method Details

#annotate(context) ⇒ Object



817
818
819
820
821
822
823
824
825
# File 'lib/dhall/typecheck.rb', line 817

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