Earlier quoted context omitted.
I'd really appreciate further comments on what to do with type errors for prolog/minikanren-like tools as typecheckers
Ok, I've got a proper keyboard now. My approach to the typing error reporting is quite compatible with the Prolog codegen. What I do: for each AST node which produce one or more type equations I record the location data (cache it and give it an index), and then issue a Prolog term like this: with_location(Id, Term), for each of the terms generated by this location. with_location semantics is simple, but may depend on…
Thanks, looks nice and pretty straightforward, will try it out