From 71947f517530303b011cd4baf3616a1da41e63ae Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Sun, 31 Mar 2019 20:18:16 -0500 Subject: [PATCH] Keep around type information when we have it --- lib/dhall/ast.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/dhall/ast.rb b/lib/dhall/ast.rb index ad149c8..592f2ef 100644 --- a/lib/dhall/ast.rb +++ b/lib/dhall/ast.rb @@ -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 } ) -- 2.45.2