class Dhall::AsDhall::AnnotatedExpressionList

Attributes

exprs[R]
type[R]

Public Class Methods

from(type_annotation) click to toggle source
# File lib/dhall/as_dhall.rb, line 32
def self.from(type_annotation)
        if type_annotation.nil?
                new(nil, [nil])
        else
                new(type_annotation.type, [type_annotation.value])
        end
end
new(type, exprs) click to toggle source
# File lib/dhall/as_dhall.rb, line 40
def initialize(type, exprs)
        @type = type
        @exprs = exprs
end

Public Instance Methods

+(other) click to toggle source
# File lib/dhall/as_dhall.rb, line 45
def +(other)
        raise "#{type} != #{other.type}" if type != other.type
        self.class.new(type, exprs + other.exprs)
end