class Dhall::TypeChecker::Forall
Public Class Methods
new(expr)
click to toggle source
# File lib/dhall/typecheck.rb, line 871 def initialize(expr) @expr = expr @var = expr.var @var_type = expr.type @input = TypeChecker.for(expr.type) @output = TypeChecker.for(expr.body) end
Public Instance Methods
annotate(context)
click to toggle source
# File lib/dhall/typecheck.rb, line 910 def annotate(context) inkind = KINDS.index(@input.annotate(context).type) outkind = KINDS.index(@output.annotate(context.add(@expr)).type) Dhall::TypeAnnotation.new( value: @expr, type: FunctionKind.for(inkind, outkind).kind ) end