I'm wondering what the "best" or recommended way to track type information in a statically typed #lang is, for things like showing type information on hover, printing the types of variables in a context, typing holes with the TODO-list package, showing types in error messages, etc.
It's a macro based #lang, e.g. I'm elaborating to Racket feature rather than writing an interpreter directly.
Is this what syntax properties are for? Should my type checking algorithm emit a modified version of the syntax with the types added as properties?
Or is it better to just keep an external context while I'm type checking and adding an explicit context argument to the whole type checking procedure? Or to keep a mapping from source locations to types?
Basically I'm modifying Plait for a class I'm teaching, to make it a little more targeted at teaching FP in general for students with no background in it, and to my way of thinking.