I would describe the compiler pipeline as follows:
Tokenize -> Parse CST -> Convert to AST -> Desugar -> Type check -> Convert to CoreFn -> Convert to JS
The desugaring step handles things like do notation and name resolution, and generally puts the AST into a simpler form so that it’s easier to type check. Let me know if I can provide more clarity on any of the others.
Lately I’ve been studying some parts of the purescript typechecker a lot. It would be useful to have some sort of list with all the papers it implements!