class Dhall::TypeChecker::List::AnnotatedList

Public Class Methods

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

Public Instance Methods

annotation() click to toggle source
# File lib/dhall/typecheck.rb, line 418
def annotation
        list = @alist.with(type: Builtins[:List].call(element_type))
        Dhall::TypeAnnotation.new(type: list.type, value: list)
end
element_type() click to toggle source
# File lib/dhall/typecheck.rb, line 423
def element_type
        (@alist.first.value&.type || @alist.element_type).normalize
end
element_types() click to toggle source
# File lib/dhall/typecheck.rb, line 427
def element_types
        @alist.to_a.map(&:type).map(&:normalize)
end