~singpolyma/dhall-ruby

71947f517530303b011cd4baf3616a1da41e63ae — Stephen Paul Weber 5 years ago ad023f4
Keep around type information when we have it
1 files changed, 4 insertions(+), 1 deletions(-)

M lib/dhall/ast.rb
M lib/dhall/ast.rb => lib/dhall/ast.rb +4 -1
@@ 680,7 680,10 @@ module Dhall
		def self.from(alts, tag, value)
			new(
				tag:          tag,
				value:        value,
				value:        TypeAnnotation.new(
					value: value,
					type:  alts.alternatives[tag]
				),
				alternatives: alts.with(
					alternatives: alts.alternatives.reject { |alt, _| alt == tag }
				)