class Dhall::TypeChecker::Literal

Public Class Methods

new(lit) click to toggle source
# File lib/dhall/typecheck.rb, line 110
def initialize(lit)
        @lit = lit
        @type = Dhall::Variable[lit.class.name.split(/::/).last]
        @type = Builtins[@type.name.to_sym] || @type
end

Public Instance Methods

annotate(*) click to toggle source
# File lib/dhall/typecheck.rb, line 116
def annotate(*)
        Dhall::TypeAnnotation.new(
                value: @lit,
                type:  @type
        )
end