~singpolyma/dhall-ruby

f85cd482fb82ab6882d332bfe6c059b0c225fdc6 — Stephen Paul Weber 5 years ago b10207d
Refactor Record typecheck
1 files changed, 3 insertions(+), 8 deletions(-)

M lib/dhall/typecheck.rb
M lib/dhall/typecheck.rb => lib/dhall/typecheck.rb +3 -8
@@ 540,16 540,11 @@ module Dhall
					[k, TypeChecker.for(v).annotate(context)]
				end

				type = Dhall::RecordType.for(Hash[
					arecord.record.map { |k, v| [k, v.type] }
				])

				# Annonate to sanity check
				TypeChecker.for(type).annotate(context)

				Dhall::TypeAnnotation.new(
					value: arecord,
					type:  type
					type:  TypeChecker.for(Dhall::RecordType.for(Hash[
						arecord.record.map { |k, v| [k, v.type] }
					])).annotate(context).value
				)
			end
		end