@@ 61,48 61,6 @@ module Dhall
end
end
- module BuiltinName
- NAMES = [
- "Natural/build",
- "Natural/fold",
- "Natural/isZero",
- "Natural/even",
- "Natural/odd",
- "Natural/toInteger",
- "Natural/show",
- "Integer/toDouble",
- "Integer/show",
- "Double/show",
- "List/build",
- "List/fold",
- "List/length",
- "List/head",
- "List/last",
- "List/indexed",
- "List/reverse",
- "Optional/fold",
- "Optional/build",
- "Text/show",
- "Bool",
- "Optional",
- "Natural",
- "Integer",
- "Double",
- "Text",
- "List",
- "True",
- "False",
- "None",
- "Type",
- "Kind",
- "Sort"
- ].freeze
-
- def self.===(other)
- NAMES.include?(other)
- end
- end
-
def self.match_results(xs=nil, ys=nil)
Array(xs).each_with_index.map do |r, idx|
yield r, ys[idx]
@@ 179,7 179,9 @@ end
puts "rule reserved_identifier"
print "\t"
-puts Dhall::Util::BuiltinName::NAMES.map { |name| "\"#{name}\"" }.join(" |\n\t")
+puts Dhall::Builtins.constants.map { |name|
+ "\"#{name.to_s.tr("_", "/")}\""
+}.join(" |\n\t")
puts "end"
puts "end"