hmac / kite

A Haskell-like language for scripting and web apps
BSD 3-Clause "New" or "Revised" License
13 stars 0 forks source link

Typechecking in debug mode #3

Closed hmac closed 3 years ago

hmac commented 4 years ago

It's really useful when tracking down typechecking bugs to be able to see the trace of the typechecker's decisions. This is challenging to display mostly because the input and output contexts can be very large. A simple example, omitting output contexts:

check {} -> (\x -> x) : A -> A
  check {x : A} -> x : A
    infer {x : A} -> x : A
      subtype {x : A} -> A < A

Ideally we'd have a flag that would enable printing a debugging trace during typechecking that would help track down bugs.