Class: Dhall::TypeChecker::EmptyList
- Inherits:
-
Object
- Object
- Dhall::TypeChecker::EmptyList
- Defined in:
- lib/dhall/typecheck.rb
Instance Method Summary collapse
- #annotate(context) ⇒ Object
-
#initialize(expr) ⇒ EmptyList
constructor
A new instance of EmptyList.
Constructor Details
#initialize(expr) ⇒ EmptyList
Returns a new instance of EmptyList.
360 361 362 |
# File 'lib/dhall/typecheck.rb', line 360 def initialize(expr) @expr = expr end |
Instance Method Details
#annotate(context) ⇒ Object
364 365 366 367 368 369 370 |
# File 'lib/dhall/typecheck.rb', line 364 def annotate(context) TypeChecker.assert_type @expr.element_type, Builtins[:Type], "EmptyList element type not of type Type", context: context Dhall::TypeAnnotation.new(type: @expr.type, value: @expr) end |