class Dhall::TypeChecker::Record

Public Class Methods

new(record) click to toggle source
# File lib/dhall/typecheck.rb, line 561
def initialize(record)
        @record = record
end

Public Instance Methods

annotate(context) click to toggle source
# File lib/dhall/typecheck.rb, line 565
def annotate(context)
        arecord = @record.map do |k, v|
                [k, TypeChecker.for(v).annotate(context)]
        end

        Dhall::TypeAnnotation.new(
                value: arecord,
                type:  TypeChecker.for(Dhall::RecordType.for(Hash[
                        arecord.record.map { |k, v| [k, v.type] }
                ])).annotate(context).value
        )
end