Documentation

STLCLean.check

def check (ctx : TypeCtx) (t : Term) :

Type assignment checker Returns some ty if t can be assigned type ty in context ctx, or none if the term is ill-typed.

  • .var c: look up c in the context.
  • .abs x m: check m, look up x's type, and form the arrow type x.ty → m.ty.
  • .app m n: check both m and n; require m : domain → ty and n : domain.
Equations
Instances For
    def WellTyped (ctx : TypeCtx) (t : Term) (ty : CurryType) :

    Predicate asserting that term t has type ty in context ctx. Defined as the decidable proposition check ctx t = some ty.

    Equations
    Instances For
      def runTest' (name : String) (t : Term) :
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For