Class: Dhall::TypeChecker::Function
- Inherits:
-
Object
- Object
- Dhall::TypeChecker::Function
- Defined in:
- lib/dhall/typecheck.rb
Instance Method Summary collapse
- #annotate(context) ⇒ Object
-
#initialize(func) ⇒ Function
constructor
A new instance of Function.
Constructor Details
Instance Method Details
#annotate(context) ⇒ Object
806 807 808 809 810 811 812 813 814 815 |
# File 'lib/dhall/typecheck.rb', line 806 def annotate(context) abody = @output.annotate(context.add(@type)) Dhall::TypeAnnotation.new( value: @func.with(body: abody), type: TypeChecker.for( @type.with(body: abody.type) ).annotate(context).value ) end |