class Dhall::TypeChecker::Builtin
Public Class Methods
for(builtin)
click to toggle source
# File lib/dhall/typecheck.rb, line 1347 def self.for(builtin) if builtin.is_a?(Dhall::BuiltinFunction) if (unfilled = builtin.unfill) != builtin return TypeChecker.for(unfilled) end end new(builtin) end
new(builtin)
click to toggle source
# File lib/dhall/typecheck.rb, line 1357 def initialize(builtin) @expr = builtin @name = builtin.as_json end
Public Instance Methods
annotate(*)
click to toggle source
# File lib/dhall/typecheck.rb, line 1362 def annotate(*) Dhall::TypeAnnotation.new( value: @expr, type: BUILTIN_TYPES.fetch(@name) do raise TypeError, "Unknown Builtin #{@name}" end ) end