The GHC compiler for Haskell code performs an intermediate step that happens after parsing, but before typechecking. This module is called the "renamer", and its primary goal is to assign a unique identifier to each logical variable. See #93 (Note that we should also store the original name of variables as discussed in the issue)
In addition to that, the renamer should perform the following things (See #96):
Dependency analysis for mutually-recursive function and type declarations and generate a compilation order.
Identifying all available (globally-scoped) functions and generating a symbol table for them
The GHC renamer also does an additional job of sorting out operator fixities and association, but I assume we already deal with that in the parser.
The GHC compiler for Haskell code performs an intermediate step that happens after parsing, but before typechecking. This module is called the "renamer", and its primary goal is to assign a unique identifier to each logical variable. See #93 (Note that we should also store the original name of variables as discussed in the issue)
In addition to that, the renamer should perform the following things (See #96):
The GHC renamer also does an additional job of sorting out operator fixities and association, but I assume we already deal with that in the parser.
References that may be helpful: