~singpolyma/dhall-ruby

b730651e6b3b37087c71978b9665854114ef8dc6 — Stephen Paul Weber 5 years ago 6bc6839
All beta normalization except for functions
108 files changed, 471 insertions(+), 101 deletions(-)

M lib/dhall/ast.rb
M lib/dhall/binary.rb
M lib/dhall/builtins.rb
M lib/dhall/normalize.rb
A test/normalization/beta/DoubleA.dhallb
A test/normalization/beta/DoubleB.dhallb
A test/normalization/beta/DoubleLiteralA.dhallb
A test/normalization/beta/DoubleLiteralB.dhallb
A test/normalization/beta/DoubleShowA.dhallb
A test/normalization/beta/DoubleShowB.dhallb
A test/normalization/beta/DoubleShowValueA.dhallb
A test/normalization/beta/DoubleShowValueB.dhallb
A test/normalization/beta/IntegerA.dhallb
A test/normalization/beta/IntegerB.dhallb
A test/normalization/beta/IntegerNegativeA.dhallb
A test/normalization/beta/IntegerNegativeB.dhallb
A test/normalization/beta/IntegerPositiveA.dhallb
A test/normalization/beta/IntegerPositiveB.dhallb
A test/normalization/beta/IntegerShow-12A.dhallb
A test/normalization/beta/IntegerShow-12B.dhallb
A test/normalization/beta/IntegerShow12A.dhallb
A test/normalization/beta/IntegerShow12B.dhallb
A test/normalization/beta/IntegerShowA.dhallb
A test/normalization/beta/IntegerShowB.dhallb
A test/normalization/beta/IntegerToDouble-12A.dhallb
A test/normalization/beta/IntegerToDouble-12B.dhallb
A test/normalization/beta/IntegerToDouble12A.dhallb
A test/normalization/beta/IntegerToDouble12B.dhallb
A test/normalization/beta/IntegerToDoubleA.dhallb
A test/normalization/beta/IntegerToDoubleB.dhallb
A test/normalization/beta/LetA.dhallb
A test/normalization/beta/LetB.dhallb
A test/normalization/beta/LetWithTypeA.dhallb
A test/normalization/beta/LetWithTypeB.dhallb
A test/normalization/beta/MergeA.dhallb
A test/normalization/beta/MergeB.dhallb
A test/normalization/beta/MergeNormalizeArgumentsA.dhallb
A test/normalization/beta/MergeNormalizeArgumentsB.dhallb
A test/normalization/beta/MergeWithTypeA.dhallb
A test/normalization/beta/MergeWithTypeB.dhallb
A test/normalization/beta/MergeWithTypeNormalizeArgumentsA.dhallb
A test/normalization/beta/MergeWithTypeNormalizeArgumentsB.dhallb
A test/normalization/beta/RecordA.dhallb
A test/normalization/beta/RecordB.dhallb
A test/normalization/beta/RecordEmptyA.dhallb
A test/normalization/beta/RecordEmptyB.dhallb
A test/normalization/beta/RecordProjectionA.dhallb
A test/normalization/beta/RecordProjectionB.dhallb
A test/normalization/beta/RecordProjectionEmptyA.dhallb
A test/normalization/beta/RecordProjectionEmptyB.dhallb
A test/normalization/beta/RecordProjectionNormalizeArgumentsA.dhallb
A test/normalization/beta/RecordProjectionNormalizeArgumentsB.dhallb
A test/normalization/beta/RecordSelectionA.dhallb
A test/normalization/beta/RecordSelectionB.dhallb
A test/normalization/beta/RecordSelectionNormalizeArgumentsA.dhallb
A test/normalization/beta/RecordSelectionNormalizeArgumentsB.dhallb
A test/normalization/beta/RecordTypeA.dhallb
A test/normalization/beta/RecordTypeB.dhallb
A test/normalization/beta/RecordTypeEmptyA.dhallb
A test/normalization/beta/RecordTypeEmptyB.dhallb
A test/normalization/beta/RecursiveRecordMergeCollisionA.dhallb
A test/normalization/beta/RecursiveRecordMergeCollisionB.dhallb
A test/normalization/beta/RecursiveRecordMergeLhsEmptyA.dhallb
A test/normalization/beta/RecursiveRecordMergeLhsEmptyB.dhallb
A test/normalization/beta/RecursiveRecordMergeNoCollisionA.dhallb
A test/normalization/beta/RecursiveRecordMergeNoCollisionB.dhallb
A test/normalization/beta/RecursiveRecordMergeNormalizeArgumentsA.dhallb
A test/normalization/beta/RecursiveRecordMergeNormalizeArgumentsB.dhallb
A test/normalization/beta/RecursiveRecordMergeRhsEmptyA.dhallb
A test/normalization/beta/RecursiveRecordMergeRhsEmptyB.dhallb
A test/normalization/beta/RecursiveRecordTypeMergeCollisionA.dhallb
A test/normalization/beta/RecursiveRecordTypeMergeCollisionB.dhallb
A test/normalization/beta/RecursiveRecordTypeMergeLhsEmptyA.dhallb
A test/normalization/beta/RecursiveRecordTypeMergeLhsEmptyB.dhallb
A test/normalization/beta/RecursiveRecordTypeMergeNoCollisionA.dhallb
A test/normalization/beta/RecursiveRecordTypeMergeNoCollisionB.dhallb
A test/normalization/beta/RecursiveRecordTypeMergeNormalizeArgumentsA.dhallb
A test/normalization/beta/RecursiveRecordTypeMergeNormalizeArgumentsB.dhallb
A test/normalization/beta/RecursiveRecordTypeMergeRhsEmptyA.dhallb
A test/normalization/beta/RecursiveRecordTypeMergeRhsEmptyB.dhallb
A test/normalization/beta/RightBiasedRecordMergeCollisionA.dhallb
A test/normalization/beta/RightBiasedRecordMergeCollisionB.dhallb
A test/normalization/beta/RightBiasedRecordMergeLhsEmptyA.dhallb
A test/normalization/beta/RightBiasedRecordMergeLhsEmptyB.dhallb
A test/normalization/beta/RightBiasedRecordMergeNoCollisionA.dhallb
A test/normalization/beta/RightBiasedRecordMergeNoCollisionB.dhallb
A test/normalization/beta/RightBiasedRecordMergeNormalizeArgumentsA.dhallb
A test/normalization/beta/RightBiasedRecordMergeNormalizeArgumentsB.dhallb
A test/normalization/beta/RightBiasedRecordMergeRhsEmptyA.dhallb
A test/normalization/beta/RightBiasedRecordMergeRhsEmptyB.dhallb
A test/normalization/beta/TypeAnnotationA.dhallb
A test/normalization/beta/TypeAnnotationB.dhallb
A test/normalization/beta/UnionNormalizeAlternativesA.dhallb
A test/normalization/beta/UnionNormalizeAlternativesB.dhallb
A test/normalization/beta/UnionNormalizeArgumentsA.dhallb
A test/normalization/beta/UnionNormalizeArgumentsB.dhallb
A test/normalization/beta/UnionProjectConstructorA.dhallb
A test/normalization/beta/UnionProjectConstructorB.dhallb
A test/normalization/beta/UnionProjectConstructorNormalizeArgumentsA.dhallb
A test/normalization/beta/UnionProjectConstructorNormalizeArgumentsB.dhallb
A test/normalization/beta/UnionSortAlternativesA.dhallb
A test/normalization/beta/UnionSortAlternativesB.dhallb
A test/normalization/beta/UnionTypeA.dhallb
A test/normalization/beta/UnionTypeB.dhallb
A test/normalization/beta/UnionTypeEmptyA.dhallb
A test/normalization/beta/UnionTypeEmptyB.dhallb
A test/normalization/beta/UnionTypeNormalizeArgumentsA.dhallb
A test/normalization/beta/UnionTypeNormalizeArgumentsB.dhallb
M lib/dhall/ast.rb => lib/dhall/ast.rb +216 -69
@@ 21,6 21,14 @@ module Dhall
			method(:call).to_proc
		end

		def fetch(k)
			RecordSelection.new(record: self, selector: k)
		end

		def slice(*keys)
			RecordProjection.new(record: self, selectors: keys)
		end

		def +(other)
			Operator::Plus.new(lhs: self, rhs: other)
		end


@@ 71,6 79,33 @@ module Dhall
				Operator::Equal.new(lhs: self, rhs: other)
			end
		end

		def deep_merge(other)
			case other
			when EmptyRecord
				other.deep_merge(self)
			else
				Operator::RecursiveRecordMerge.new(lhs: self, rhs: other)
			end
		end

		def merge(other)
			case other
			when EmptyRecord
				other.merge(self)
			else
				Operator::RightBiasedRecordMerge.new(lhs: self, rhs: other)
			end
		end

		def deep_merge_type(other)
			case other
			when EmptyRecordType
				other.deep_merge_type(self)
			else
				Operator::RecursiveRecordTypeMerge.new(lhs: self, rhs: other)
			end
		end
	end

	class Application < Expression


@@ 85,14 120,14 @@ module Dhall
	end

	class Function < Expression
		def initialize(var, type, body)
			@var = var
			@type = type
			@body = body
		end
		include(ValueSemantics.for_attributes do
			var  ::String
			type Either(nil, Expression) # nil is not allowed in proper Dhall
			body Expression
		end)

		def map_subexpressions(&block)
			self.class.new(@var, block[@type], block[@body])
			with(var: var, type: type.nil? ? nil : block[type], body: block[body])
		end
	end



@@ 145,9 180,9 @@ module Dhall
		class Times < Operator; end
		class TextConcatenate < Operator; end
		class ListConcatenate < Operator; end
		class RecordMerge < Operator; end
		class RecordOverride < Operator; end
		class RecordTypeMerge < Operator; end
		class RecursiveRecordMerge < Operator; end
		class RightBiasedRecordMerge < Operator; end
		class RecursiveRecordTypeMerge < Operator; end
		class ImportFallback < Operator; end
	end



@@ 257,14 292,18 @@ module Dhall
	end

	class Merge < Expression
		def initialize(record, input, type)
			@record = record
			@input = input
			@type = type
		end
		include(ValueSemantics.for_attributes do
			record Expression
			input  Expression
			type  Either(Expression, nil)
		end)

		def map_subexpressions(&block)
			self.class.new(block[@record], block[@input], block[@type])
			with(
				record: block[record],
				input: block[input],
				type: type.nil? ? nil : block[type]
			)
		end
	end



@@ 272,19 311,39 @@ module Dhall
		attr_reader :record

		def initialize(record)
			raise ArgumentError, "You meant EmptyRecordType?" if record.empty?
			@record = record
		end

		def map_subexpressions(&block)
			self.class.new(
				Hash[*@record.map { |k, v| [k, block[v]] }],
				block[@input],
				block[@type]
			)
			self.class.new(Hash[*@record.map { |k, v| [k, block[v]] }])
		end

		def deep_merge_type(other)
			return super unless other.is_a?(RecordType)
			self.class.new(Hash[record.merge(other.record) { |_, v1, v2|
				v1.deep_merge_type(v2)
			}.sort])
		end

		def ==(other)
			other.respond_to?(:record) && record.to_a == other.record.to_a
		end

		def eql?(other)
			record == other.record
			self == other
		end
	end

	class EmptyRecordType < Expression
		include ValueSemantics.for_attributes { }

		def map_subexpressions
			self
		end

		def deep_merge_type(other)
			other
		end
	end



@@ 292,6 351,7 @@ module Dhall
		attr_reader :record

		def initialize(record)
			raise ArgumentError, "You meant EmptyRecord?" if record.empty?
			@record = record
		end



@@ 299,63 359,139 @@ module Dhall
			self.class.new(Hash[*@record.map { |k, v| [k, block[v]] }])
		end

		def fetch(k, default=nil, &block)
			record.fetch(k, *default, &block)
		end

		def slice(*keys)
			if record.respond_to?(:slice)
				self.class.new(record.slice(*keys))
			else
				self.class.new(record.select { |k, _| keys.include?(k) })
			end
		end

		def deep_merge(other)
			return super unless other.is_a?(Record)
			self.class.new(Hash[record.merge(other.record) { |_, v1, v2|
				v1.deep_merge(v2)
			}.sort])
		end

		def merge(other)
			return super unless other.is_a?(Record)
			self.class.new(Hash[record.merge(other.record).sort])
		end

		def ==(other)
			other.respond_to?(:record) && record.to_a == other.record.to_a
		end

		def eql?(other)
			record == other.record
			self == other
		end
	end

	class RecordFieldAccess < Expression
		def initialize(record, field)
			raise TypeError, "field must be a String" unless field.is_a?(String)
	class EmptyRecord < Expression
		include ValueSemantics.for_attributes { }

			@record = record
			@field = field
		def map_subexpressions
			self
		end

		def fetch(k, default=nil, &block)
			{}.fetch(k, *default, &block)
		end

		def slice(*)
			self
		end

		def deep_merge(other)
			other
		end

		def merge(other)
			other
		end
	end

	class RecordSelection < Expression
		include(ValueSemantics.for_attributes do
			record Expression
			selector ::String
		end)

		def map_subexpressions(&block)
			self.class.new(Hash[*@record.map { |k, v| [k, block[v]] }], @field)
			with(record: block[record], selector: selector)
		end
	end

	class RecordProjection < Expression
		def initialize(record, *fields)
			unless fields.all? { |x| x.is_a?(String) }
				raise TypeError, "fields must be String"
			end
		include(ValueSemantics.for_attributes do
			record Expression
			selectors Util::ArrayOf.new(::String, min: 1)
		end)

			@record = record
			@fields = fields
		def map_subexpressions(&block)
			with(record: block[record], selectors: selectors)
		end
	end

	class EmptyRecordProjection < Expression
		include(ValueSemantics.for_attributes do
			record Expression
		end)

		def map_subexpressions(&block)
			self.class.new(Hash[*@record.map { |k, v| [k, block[v]] }], @fields)
			with(record: block[record])
		end
	end

	class UnionType < Expression
		attr_reader :record

		def initialize(record)
			@record = record
		end

		def map_subexpressions(&block)
			self.class.new(Hash[*@record.map { |k, v| [k, block[v]] }])
			self.class.new(Hash[@record.map { |k, v| [k, block[v]] }])
		end
	end

	class Union < Expression
		def initialize(tag, value, rest_of_type)
			raise TypeError, "tag must be a string" unless tag.is_a?(String)
		def ==(other)
			other.respond_to?(:record) && record.to_a == other.record.to_a
		end

			@tag = tag
			@value = value
			@rest_of_type = rest_of_type
		def eql?(other)
			self == other
		end

		def fetch(k)
			Function.new(
				var:  k,
				type: record.fetch(k),
				body: Union.new(
					tag: k,
					value: Variable.new(name: k),
					alternatives: self.class.new(record.dup.tap { |r| r.delete(k) })
				)
			)
		end
	end

	class Union < Expression
		include(ValueSemantics.for_attributes do
			tag          ::String
			value        Expression
			alternatives UnionType
		end)

		def map_subexpressions(&block)
			self.class.new(
				@tag,
				block[@value],
				Hash[*@rest_of_type.map { |k, v| [k, block[v]] }]
			with(
				tag:          tag,
				value:        block[value],
				alternatives: block[alternatives]
			)
		end
	end


@@ 436,12 572,20 @@ module Dhall
		include(ValueSemantics.for_attributes do
			value ::Integer
		end)

		def to_s
			"#{value >= 0 ? "+" : ""}#{value.to_s}"
		end
	end

	class Double < Number
		include(ValueSemantics.for_attributes do
			value ::Float
		end)

		def to_s
			value.to_s
		end
	end

	class Text < Expression


@@ 516,43 660,46 @@ module Dhall
	end

	class Let
		def initialize(var, assign, type=nil)
			@var = var
			@assign = assign
			@type = type
		end
		include(ValueSemantics.for_attributes do
			var    ::String
			assign Expression
			type   Either(nil, Expression)
		end)

		def map_subexpressions(&block)
			self.class.new(@var, block[@assign], block[@type])
			with(
				var: var,
				assign: block[assign],
				type: type.nil? ? nil : block[type]
			)
		end
	end

	class LetBlock < Expression
		def initialize(body, *lets)
			unless lets.all? { |x| x.is_a?(Let) }
				raise TypeError, "LetBlock only contains Let"
			end

			@lets = lets
			@body = body
		end
		include(ValueSemantics.for_attributes do
			lets ArrayOf(Let)
			body Expression
		end)

		def map_subexpressions(&block)
			self.class.new(
				block[@body],
				*@lets.map { |let| let.map_subexpressions(&block) }
			with(
				body: block[body],
				lets: lets.map { |let| let.map_subexpressions(&block) }
			)
		end
	end

	class TypeAnnotation < Expression
		def initialize(value, type)
			@value = value
			@type = type
		end
		include(ValueSemantics.for_attributes do
			value Expression
			type  Expression
		end)

		def map_subexpressions(&block)
			self.class.new(block[@value], block[@type])
			with(
				value: block[value],
				type: block[type]
			)
		end
	end
end

M lib/dhall/binary.rb => lib/dhall/binary.rb +44 -28
@@ 43,15 43,19 @@ module Dhall
	class Function
		def self.decode(var_or_type, type_or_body, body_or_nil=nil)
			if body_or_nil.nil?
				new("_", Dhall.decode(var_or_type), Dhall.decode(type_or_body))
				new(
					var: "_",
					type: Dhall.decode(var_or_type),
					body: Dhall.decode(type_or_body)
				)
			else
				unless var_or_type.is_a?(String)
					raise TypeError, "Function var must be a String"
				end

				raise ArgumentError, "explicit var named _" if var_or_type == "_"

				new(var_or_type, Dhall.decode(type_or_body), Dhall.decode(body_or_nil))
				new(
					var: var_or_type,
					type: Dhall.decode(type_or_body),
					body: Dhall.decode(body_or_nil)
				)
			end
		end
	end


@@ 61,7 65,7 @@ module Dhall
			Or, And, Equal, NotEqual,
			Plus, Times,
			TextConcatenate, ListConcatenate,
			RecordMerge, RecordOverride, RecordTypeMerge,
			RecursiveRecordMerge, RightBiasedRecordMerge, RecursiveRecordTypeMerge,
			ImportFallback
		].freeze



@@ 99,34 103,46 @@ module Dhall
	class Merge
		def self.decode(record, input, type=nil)
			new(
				Dhall.decode(record),
				Dhall.decode(input),
				type.nil? ? nil : Dhall.decode(type)
				record: Dhall.decode(record),
				input: Dhall.decode(input),
				type: type.nil? ? nil : Dhall.decode(type)
			)
		end
	end

	class RecordType
		def self.decode(record)
			new(Hash[record.map { |k, v| [k, Dhall.decode(v)] }])
			if record.empty?
				EmptyRecordType.new
			else
				new(Hash[record.map { |k, v| [k, Dhall.decode(v)] }])
			end
		end
	end

	class Record
		def self.decode(record)
			new(Hash[record.map { |k, v| [k, Dhall.decode(v)] }])
			if record.empty?
				EmptyRecord.new
			else
				new(Hash[record.map { |k, v| [k, Dhall.decode(v)] }])
			end
		end
	end

	class RecordFieldAccess
		def self.decode(record, field)
			new(Dhall.decode(record), field)
	class RecordSelection
		def self.decode(record, selector)
			new(record: Dhall.decode(record), selector: selector)
		end
	end

	class RecordProjection
		def self.decode(record, *fields)
			new(Dhall.decode(record), *fields)
		def self.decode(record, *selectors)
			if selectors.empty?
				EmptyRecordProjection.new(record: Dhall.decode(record))
			else
				new(record: Dhall.decode(record), selectors: selectors)
			end
		end
	end



@@ 137,11 153,11 @@ module Dhall
	end

	class Union
		def self.decode(tag, value, rest_of_type)
		def self.decode(tag, value, alternatives)
			new(
				tag,
				Dhall.decode(value),
				Hash[rest_of_type.map { |k, v| [k, Dhall.decode(v)] }]
				tag: tag,
				value: Dhall.decode(value),
				alternatives: UnionType.decode(alternatives)
			)
		end
	end


@@ 190,12 206,12 @@ module Dhall
	class LetBlock
		def self.decode(*parts)
			new(
				Dhall.decode(parts.pop),
				*parts.each_slice(3).map do |(var, type, assign)|
				body: Dhall.decode(parts.pop),
				lets: parts.each_slice(3).map do |(var, type, assign)|
					Let.new(
						var,
						Dhall.decode(assign),
						type.nil? ? nil : Dhall.decode(type)
						var:    var,
						assign: Dhall.decode(assign),
						type:   type.nil? ? nil : Dhall.decode(type)
					)
				end
			)


@@ 204,7 220,7 @@ module Dhall

	class TypeAnnotation
		def self.decode(value, type)
			new(Dhall.decode(value), Dhall.decode(type))
			new(value: Dhall.decode(value), type: Dhall.decode(type))
		end
	end



@@ 235,7 251,7 @@ module Dhall
		Merge,
		RecordType,
		Record,
		RecordFieldAccess,
		RecordSelection,
		RecordProjection,
		UnionType,
		Union,

M lib/dhall/builtins.rb => lib/dhall/builtins.rb +33 -3
@@ 19,6 19,36 @@ module Dhall
	module Builtins
		# rubocop:disable Style/ClassAndModuleCamelCase

		class Double_show < Builtin
			def call(arg)
				if arg.is_a?(Double)
					Text.new(value: "\"#{arg.to_s}\"")
				else
					super
				end
			end
		end

		class Integer_show < Builtin
			def call(arg)
				if arg.is_a?(Integer)
					Text.new(value: "\"#{arg.to_s}\"")
				else
					super
				end
			end
		end

		class Integer_toDouble < Builtin
			def call(arg)
				if arg.is_a?(Integer)
					Double.new(value: arg.value.to_f)
				else
					super
				end
			end
		end

		class Natural_build < Builtin
			def fusion(arg, *bogus)
				if bogus.empty? &&


@@ 35,9 65,9 @@ module Dhall
				arg.call(
					Variable.new(name: "Natural"),
					Function.new(
						"_",
						Variable.new(name: "Natural"),
						Operator::Plus.new(
						var:  "_",
						type: Variable.new(name: "Natural"),
						body: Operator::Plus.new(
							lhs: Variable.new(name: "_"),
							rhs: Natural.new(value: 1)
						)

M lib/dhall/normalize.rb => lib/dhall/normalize.rb +71 -1
@@ 126,6 126,24 @@ module Dhall
				lhs.normalize.concat(rhs.normalize)
			end
		end

		class RecursiveRecordMerge
			def normalize
				lhs.normalize.deep_merge(rhs.normalize)
			end
		end

		class RightBiasedRecordMerge
			def normalize
				lhs.normalize.merge(rhs.normalize)
			end
		end

		class RecursiveRecordTypeMerge
			def normalize
				lhs.normalize.deep_merge_type(rhs.normalize)
			end
		end
	end

	class List


@@ 141,21 159,58 @@ module Dhall
	end

	class Merge
		def normalize
			normalized = super
			if normalized.record.is_a?(Record) && normalized.input.is_a?(Union)
				normalized.record.fetch(normalized.input.tag).call(
					normalized.input.value
				)
			else
				normalized
			end
		end
	end

	class RecordType
		def normalize
			self.class.new(Hash[record.sort.map { |(k, v)| [k, v.normalize] }])
		end
	end

	class Record
		def normalize
			self.class.new(Hash[record.sort.map { |(k, v)| [k, v.normalize] }])
		end
	end

	class EmptyRecord
		def normalize
			self
		end
	end

	class RecordFieldAccess
	class RecordSelection
		def normalize
			record.normalize.fetch(selector)
		end
	end

	class RecordProjection
		def normalize
			record.normalize.slice(*selectors)
		end
	end

	class EmptyRecordProjection
		def normalize
			EmptyRecord.new
		end
	end

	class UnionType
		def normalize
			self.class.new(Hash[super.record.sort])
		end
	end

	class Union


@@ 218,8 273,23 @@ module Dhall
	end

	class LetBlock
		def normalize
			lets.reduce(body) { |inside, let|
				Application.new(
					function: Function.new(
						var: let.var,
						type: let.type,
						body: inside
					),
					arguments: [let.assign]
				)
			}.normalize
		end
	end

	class TypeAnnotation
		def normalize
			value.normalize
		end
	end
end

A test/normalization/beta/DoubleA.dhallb => test/normalization/beta/DoubleA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0fDouble
\ No newline at end of file

A test/normalization/beta/DoubleB.dhallb => test/normalization/beta/DoubleB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0fDouble
\ No newline at end of file

A test/normalization/beta/DoubleLiteralA.dhallb => test/normalization/beta/DoubleLiteralA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�?�333333
\ No newline at end of file

A test/normalization/beta/DoubleLiteralB.dhallb => test/normalization/beta/DoubleLiteralB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�?�333333
\ No newline at end of file

A test/normalization/beta/DoubleShowA.dhallb => test/normalization/beta/DoubleShowA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0kDouble/show
\ No newline at end of file

A test/normalization/beta/DoubleShowB.dhallb => test/normalization/beta/DoubleShowB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0kDouble/show
\ No newline at end of file

A test/normalization/beta/DoubleShowValueA.dhallb => test/normalization/beta/DoubleShowValueA.dhallb +0 -0
A test/normalization/beta/DoubleShowValueB.dhallb => test/normalization/beta/DoubleShowValueB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�e"1.2"
\ No newline at end of file

A test/normalization/beta/IntegerA.dhallb => test/normalization/beta/IntegerA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0gInteger
\ No newline at end of file

A test/normalization/beta/IntegerB.dhallb => test/normalization/beta/IntegerB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0gInteger
\ No newline at end of file

A test/normalization/beta/IntegerNegativeA.dhallb => test/normalization/beta/IntegerNegativeA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0� 
\ No newline at end of file

A test/normalization/beta/IntegerNegativeB.dhallb => test/normalization/beta/IntegerNegativeB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0� 
\ No newline at end of file

A test/normalization/beta/IntegerPositiveA.dhallb => test/normalization/beta/IntegerPositiveA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�
\ No newline at end of file

A test/normalization/beta/IntegerPositiveB.dhallb => test/normalization/beta/IntegerPositiveB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�
\ No newline at end of file

A test/normalization/beta/IntegerShow-12A.dhallb => test/normalization/beta/IntegerShow-12A.dhallb +0 -0
A test/normalization/beta/IntegerShow-12B.dhallb => test/normalization/beta/IntegerShow-12B.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�e"-12"
\ No newline at end of file

A test/normalization/beta/IntegerShow12A.dhallb => test/normalization/beta/IntegerShow12A.dhallb +0 -0
A test/normalization/beta/IntegerShow12B.dhallb => test/normalization/beta/IntegerShow12B.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�e"+12"
\ No newline at end of file

A test/normalization/beta/IntegerShowA.dhallb => test/normalization/beta/IntegerShowA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0lInteger/show
\ No newline at end of file

A test/normalization/beta/IntegerShowB.dhallb => test/normalization/beta/IntegerShowB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0lInteger/show
\ No newline at end of file

A test/normalization/beta/IntegerToDouble-12A.dhallb => test/normalization/beta/IntegerToDouble-12A.dhallb +0 -0
A test/normalization/beta/IntegerToDouble-12B.dhallb => test/normalization/beta/IntegerToDouble-12B.dhallb +0 -0
A test/normalization/beta/IntegerToDouble12A.dhallb => test/normalization/beta/IntegerToDouble12A.dhallb +0 -0
A test/normalization/beta/IntegerToDouble12B.dhallb => test/normalization/beta/IntegerToDouble12B.dhallb +0 -0
A test/normalization/beta/IntegerToDoubleA.dhallb => test/normalization/beta/IntegerToDoubleA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0pInteger/toDouble
\ No newline at end of file

A test/normalization/beta/IntegerToDoubleB.dhallb => test/normalization/beta/IntegerToDoubleB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0pInteger/toDouble
\ No newline at end of file

A test/normalization/beta/LetA.dhallb => test/normalization/beta/LetA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�ax�ayax
\ No newline at end of file

A test/normalization/beta/LetB.dhallb => test/normalization/beta/LetB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0ay
\ No newline at end of file

A test/normalization/beta/LetWithTypeA.dhallb => test/normalization/beta/LetWithTypeA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�axaAayax
\ No newline at end of file

A test/normalization/beta/LetWithTypeB.dhallb => test/normalization/beta/LetWithTypeB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0ay
\ No newline at end of file

A test/normalization/beta/MergeA.dhallb => test/normalization/beta/MergeA.dhallb +0 -0
A test/normalization/beta/MergeB.dhallb => test/normalization/beta/MergeB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0ay
\ No newline at end of file

A test/normalization/beta/MergeNormalizeArgumentsA.dhallb => test/normalization/beta/MergeNormalizeArgumentsA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0���axay��azab
\ No newline at end of file

A test/normalization/beta/MergeNormalizeArgumentsB.dhallb => test/normalization/beta/MergeNormalizeArgumentsB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�axaz
\ No newline at end of file

A test/normalization/beta/MergeWithTypeA.dhallb => test/normalization/beta/MergeWithTypeA.dhallb +0 -0
A test/normalization/beta/MergeWithTypeB.dhallb => test/normalization/beta/MergeWithTypeB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0ay
\ No newline at end of file

A test/normalization/beta/MergeWithTypeNormalizeArgumentsA.dhallb => test/normalization/beta/MergeWithTypeNormalizeArgumentsA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0���axay��azab��aXaY
\ No newline at end of file

A test/normalization/beta/MergeWithTypeNormalizeArgumentsB.dhallb => test/normalization/beta/MergeWithTypeNormalizeArgumentsB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�axazaX
\ No newline at end of file

A test/normalization/beta/RecordA.dhallb => test/normalization/beta/RecordA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0��abaxaa��ayaz
\ No newline at end of file

A test/normalization/beta/RecordB.dhallb => test/normalization/beta/RecordB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0��aaayabax
\ No newline at end of file

A test/normalization/beta/RecordEmptyA.dhallb => test/normalization/beta/RecordEmptyA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0��
\ No newline at end of file

A test/normalization/beta/RecordEmptyB.dhallb => test/normalization/beta/RecordEmptyB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0��
\ No newline at end of file

A test/normalization/beta/RecordProjectionA.dhallb => test/normalization/beta/RecordProjectionA.dhallb +2 -0
@@ 0,0 1,2 @@
�e5.0.0�
��axaaayabazacaxaz
\ No newline at end of file

A test/normalization/beta/RecordProjectionB.dhallb => test/normalization/beta/RecordProjectionB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0��axaaazac
\ No newline at end of file

A test/normalization/beta/RecordProjectionEmptyA.dhallb => test/normalization/beta/RecordProjectionEmptyA.dhallb +2 -0
@@ 0,0 1,2 @@
�e5.0.0�
ax
\ No newline at end of file

A test/normalization/beta/RecordProjectionEmptyB.dhallb => test/normalization/beta/RecordProjectionEmptyB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0��
\ No newline at end of file

A test/normalization/beta/RecordProjectionNormalizeArgumentsA.dhallb => test/normalization/beta/RecordProjectionNormalizeArgumentsA.dhallb +2 -0
@@ 0,0 1,2 @@
�e5.0.0�
��ayazaxay
\ No newline at end of file

A test/normalization/beta/RecordProjectionNormalizeArgumentsB.dhallb => test/normalization/beta/RecordProjectionNormalizeArgumentsB.dhallb +2 -0
@@ 0,0 1,2 @@
�e5.0.0�
ayaxay
\ No newline at end of file

A test/normalization/beta/RecordSelectionA.dhallb => test/normalization/beta/RecordSelectionA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�	��axavax
\ No newline at end of file

A test/normalization/beta/RecordSelectionB.dhallb => test/normalization/beta/RecordSelectionB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0av
\ No newline at end of file

A test/normalization/beta/RecordSelectionNormalizeArgumentsA.dhallb => test/normalization/beta/RecordSelectionNormalizeArgumentsA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�	��ayazax
\ No newline at end of file

A test/normalization/beta/RecordSelectionNormalizeArgumentsB.dhallb => test/normalization/beta/RecordSelectionNormalizeArgumentsB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�	ayax
\ No newline at end of file

A test/normalization/beta/RecordTypeA.dhallb => test/normalization/beta/RecordTypeA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0��abaTaa��aAaB
\ No newline at end of file

A test/normalization/beta/RecordTypeB.dhallb => test/normalization/beta/RecordTypeB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0��aaaAabaT
\ No newline at end of file

A test/normalization/beta/RecordTypeEmptyA.dhallb => test/normalization/beta/RecordTypeEmptyA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0��
\ No newline at end of file

A test/normalization/beta/RecordTypeEmptyB.dhallb => test/normalization/beta/RecordTypeEmptyB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0��
\ No newline at end of file

A test/normalization/beta/RecursiveRecordMergeCollisionA.dhallb => test/normalization/beta/RecursiveRecordMergeCollisionA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0���ax��az���ax��ay�
\ No newline at end of file

A test/normalization/beta/RecursiveRecordMergeCollisionB.dhallb => test/normalization/beta/RecursiveRecordMergeCollisionB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0��ax��ay�az�
\ No newline at end of file

A test/normalization/beta/RecursiveRecordMergeLhsEmptyA.dhallb => test/normalization/beta/RecursiveRecordMergeLhsEmptyA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0���ax
\ No newline at end of file

A test/normalization/beta/RecursiveRecordMergeLhsEmptyB.dhallb => test/normalization/beta/RecursiveRecordMergeLhsEmptyB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0ax
\ No newline at end of file

A test/normalization/beta/RecursiveRecordMergeNoCollisionA.dhallb => test/normalization/beta/RecursiveRecordMergeNoCollisionA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0���ax��az���ab��ay�
\ No newline at end of file

A test/normalization/beta/RecursiveRecordMergeNoCollisionB.dhallb => test/normalization/beta/RecursiveRecordMergeNoCollisionB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0��ab��ay�ax��az�
\ No newline at end of file

A test/normalization/beta/RecursiveRecordMergeNormalizeArgumentsA.dhallb => test/normalization/beta/RecursiveRecordMergeNormalizeArgumentsA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0��ax�����ab
\ No newline at end of file

A test/normalization/beta/RecursiveRecordMergeNormalizeArgumentsB.dhallb => test/normalization/beta/RecursiveRecordMergeNormalizeArgumentsB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�axab
\ No newline at end of file

A test/normalization/beta/RecursiveRecordMergeRhsEmptyA.dhallb => test/normalization/beta/RecursiveRecordMergeRhsEmptyA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�ax��
\ No newline at end of file

A test/normalization/beta/RecursiveRecordMergeRhsEmptyB.dhallb => test/normalization/beta/RecursiveRecordMergeRhsEmptyB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0ax
\ No newline at end of file

A test/normalization/beta/RecursiveRecordTypeMergeCollisionA.dhallb => test/normalization/beta/RecursiveRecordTypeMergeCollisionA.dhallb +2 -0
@@ 0,0 1,2 @@
�e5.0.0�
��ax��azaA��ax��ayaB
\ No newline at end of file

A test/normalization/beta/RecursiveRecordTypeMergeCollisionB.dhallb => test/normalization/beta/RecursiveRecordTypeMergeCollisionB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0��ax��ayaBazaA
\ No newline at end of file

A test/normalization/beta/RecursiveRecordTypeMergeLhsEmptyA.dhallb => test/normalization/beta/RecursiveRecordTypeMergeLhsEmptyA.dhallb +2 -0
@@ 0,0 1,2 @@
�e5.0.0�
��ax
\ No newline at end of file

A test/normalization/beta/RecursiveRecordTypeMergeLhsEmptyB.dhallb => test/normalization/beta/RecursiveRecordTypeMergeLhsEmptyB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0ax
\ No newline at end of file

A test/normalization/beta/RecursiveRecordTypeMergeNoCollisionA.dhallb => test/normalization/beta/RecursiveRecordTypeMergeNoCollisionA.dhallb +2 -0
@@ 0,0 1,2 @@
�e5.0.0�
��ax��azaA��ab��ayaB
\ No newline at end of file

A test/normalization/beta/RecursiveRecordTypeMergeNoCollisionB.dhallb => test/normalization/beta/RecursiveRecordTypeMergeNoCollisionB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0��ab��ayaBax��azaA
\ No newline at end of file

A test/normalization/beta/RecursiveRecordTypeMergeNormalizeArgumentsA.dhallb => test/normalization/beta/RecursiveRecordTypeMergeNormalizeArgumentsA.dhallb +4 -0
@@ 0,0 1,4 @@
�e5.0.0�
ax���
��ab
\ No newline at end of file

A test/normalization/beta/RecursiveRecordTypeMergeNormalizeArgumentsB.dhallb => test/normalization/beta/RecursiveRecordTypeMergeNormalizeArgumentsB.dhallb +2 -0
@@ 0,0 1,2 @@
�e5.0.0�
axab
\ No newline at end of file

A test/normalization/beta/RecursiveRecordTypeMergeRhsEmptyA.dhallb => test/normalization/beta/RecursiveRecordTypeMergeRhsEmptyA.dhallb +2 -0
@@ 0,0 1,2 @@
�e5.0.0�
ax��
\ No newline at end of file

A test/normalization/beta/RecursiveRecordTypeMergeRhsEmptyB.dhallb => test/normalization/beta/RecursiveRecordTypeMergeRhsEmptyB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0ax
\ No newline at end of file

A test/normalization/beta/RightBiasedRecordMergeCollisionA.dhallb => test/normalization/beta/RightBiasedRecordMergeCollisionA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�	��ay�ax���ax�
\ No newline at end of file

A test/normalization/beta/RightBiasedRecordMergeCollisionB.dhallb => test/normalization/beta/RightBiasedRecordMergeCollisionB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0��ax�ay�
\ No newline at end of file

A test/normalization/beta/RightBiasedRecordMergeLhsEmptyA.dhallb => test/normalization/beta/RightBiasedRecordMergeLhsEmptyA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�	��ax
\ No newline at end of file

A test/normalization/beta/RightBiasedRecordMergeLhsEmptyB.dhallb => test/normalization/beta/RightBiasedRecordMergeLhsEmptyB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0ax
\ No newline at end of file

A test/normalization/beta/RightBiasedRecordMergeNoCollisionA.dhallb => test/normalization/beta/RightBiasedRecordMergeNoCollisionA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�	��ay�ax���aa�
\ No newline at end of file

A test/normalization/beta/RightBiasedRecordMergeNoCollisionB.dhallb => test/normalization/beta/RightBiasedRecordMergeNoCollisionB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0��aa�ax�ay�
\ No newline at end of file

A test/normalization/beta/RightBiasedRecordMergeNormalizeArgumentsA.dhallb => test/normalization/beta/RightBiasedRecordMergeNormalizeArgumentsA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�	�	ax���	ay��
\ No newline at end of file

A test/normalization/beta/RightBiasedRecordMergeNormalizeArgumentsB.dhallb => test/normalization/beta/RightBiasedRecordMergeNormalizeArgumentsB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�	axay
\ No newline at end of file

A test/normalization/beta/RightBiasedRecordMergeRhsEmptyA.dhallb => test/normalization/beta/RightBiasedRecordMergeRhsEmptyA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�	ax��
\ No newline at end of file

A test/normalization/beta/RightBiasedRecordMergeRhsEmptyB.dhallb => test/normalization/beta/RightBiasedRecordMergeRhsEmptyB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0ax
\ No newline at end of file

A test/normalization/beta/TypeAnnotationA.dhallb => test/normalization/beta/TypeAnnotationA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�axaA
\ No newline at end of file

A test/normalization/beta/TypeAnnotationB.dhallb => test/normalization/beta/TypeAnnotationB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0ax
\ No newline at end of file

A test/normalization/beta/UnionNormalizeAlternativesA.dhallb => test/normalization/beta/UnionNormalizeAlternativesA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�axay�ay��aXaY
\ No newline at end of file

A test/normalization/beta/UnionNormalizeAlternativesB.dhallb => test/normalization/beta/UnionNormalizeAlternativesB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�axay�ayaX
\ No newline at end of file

A test/normalization/beta/UnionNormalizeArgumentsA.dhallb => test/normalization/beta/UnionNormalizeArgumentsA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�ax��ayaz�
\ No newline at end of file

A test/normalization/beta/UnionNormalizeArgumentsB.dhallb => test/normalization/beta/UnionNormalizeArgumentsB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�axay�
\ No newline at end of file

A test/normalization/beta/UnionProjectConstructorA.dhallb => test/normalization/beta/UnionProjectConstructorA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�	��axaTax
\ No newline at end of file

A test/normalization/beta/UnionProjectConstructorB.dhallb => test/normalization/beta/UnionProjectConstructorB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�axaT�axax�
\ No newline at end of file

A test/normalization/beta/UnionProjectConstructorNormalizeArgumentsA.dhallb => test/normalization/beta/UnionProjectConstructorNormalizeArgumentsA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�	��ayazax
\ No newline at end of file

A test/normalization/beta/UnionProjectConstructorNormalizeArgumentsB.dhallb => test/normalization/beta/UnionProjectConstructorNormalizeArgumentsB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�	ayax
\ No newline at end of file

A test/normalization/beta/UnionSortAlternativesA.dhallb => test/normalization/beta/UnionSortAlternativesA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�axay�azaAayaB
\ No newline at end of file

A test/normalization/beta/UnionSortAlternativesB.dhallb => test/normalization/beta/UnionSortAlternativesB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0�axay�ayaBazaA
\ No newline at end of file

A test/normalization/beta/UnionTypeA.dhallb => test/normalization/beta/UnionTypeA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0��azaAaxaB
\ No newline at end of file

A test/normalization/beta/UnionTypeB.dhallb => test/normalization/beta/UnionTypeB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0��axaBazaA
\ No newline at end of file

A test/normalization/beta/UnionTypeEmptyA.dhallb => test/normalization/beta/UnionTypeEmptyA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0��
\ No newline at end of file

A test/normalization/beta/UnionTypeEmptyB.dhallb => test/normalization/beta/UnionTypeEmptyB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0��
\ No newline at end of file

A test/normalization/beta/UnionTypeNormalizeArgumentsA.dhallb => test/normalization/beta/UnionTypeNormalizeArgumentsA.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0��ax��aBaZazaA
\ No newline at end of file

A test/normalization/beta/UnionTypeNormalizeArgumentsB.dhallb => test/normalization/beta/UnionTypeNormalizeArgumentsB.dhallb +1 -0
@@ 0,0 1,1 @@
�e5.0.0��axaBazaA
\ No newline at end of file