~singpolyma/dhall-ruby

6de53221e8ebe5a1672d1ba5ab6e57466d7be754 — Stephen Paul Weber 4 years ago bd92c8b
Update to latest dhall-lang

* Allow selection from union Kind or Sort
* End of line is always \n (for multiline test case)
* Multiline of only blank lines should not error
3 files changed, 10 insertions(+), 4 deletions(-)

M dhall-lang
M lib/dhall/parser.rb
M lib/dhall/typecheck.rb
M dhall-lang => dhall-lang +1 -1
@@ 1,1 1,1 @@
Subproject commit 092996d5fe5a203a2e1cd97ab5f6c5be70cc3168
Subproject commit ca511abcc13a681ebe1101ed52160a77d6e4366d

M lib/dhall/parser.rb => lib/dhall/parser.rb +8 -2
@@ 277,8 277,8 @@ module Dhall
			def value
				chunks = capture(:single_quote_continue).value
				raw = chunks.join
				indent = raw.scan(/^[ \t]*(?=[^ \t\r\n])/).map(&:chars)
				            .reduce(&Util.method(:longest_common_prefix)).length
				indent = raw.scan(/^[ \t]*(?=[^ \t\n])/).map(&:chars)
				            .reduce(&Util.method(:longest_common_prefix))&.length.to_i
				indent = 0 if raw.end_with?("\n")

				TextLiteral.for(


@@ 295,6 295,12 @@ module Dhall
			end
		end

		module EndOfLine
			def value
				"\n"
			end
		end

		module Interpolation
			def value
				capture(:complete_expression).value

M lib/dhall/typecheck.rb => lib/dhall/typecheck.rb +1 -1
@@ 537,7 537,7 @@ module Dhall

			class Selector
				def self.for(annotated_record)
					if annotated_record.type == Builtins[:Type]
					if KINDS.include?(annotated_record.type)
						TypeSelector.new(annotated_record.value)
					elsif annotated_record.type.class == Dhall::RecordType
						new(annotated_record.type)