class Dhall::TypeChecker::List
Public Class Methods
new(list)
click to toggle source
# File lib/dhall/typecheck.rb, line 409 def initialize(list) @list = list end
Public Instance Methods
annotate(context)
click to toggle source
# File lib/dhall/typecheck.rb, line 432 def annotate(context) alist = AnnotatedList.new(@list.map(type: @list.element_type) { |el| TypeChecker.for(el).annotate(context) }) TypeChecker.assert alist.element_types, Util::ArrayOf.new(alist.element_type), "Non-homogenous List" TypeChecker.assert_type alist.element_type, Builtins[:Type], "List type not of type Type", context: context alist.annotation end