Note [Using PatSyn FreeVars]

GHC/Rename/Pat.hs:1135 compiler 2 tickets

When we are disambiguating a non-overloaded record update, as per
Note [Disambiguating record updates], and have determined that this
record update might involve pattern synonym record fields, it is important
to declare usage of all these pattern synonyms record fields in the returned
FreeVars of rnHsRecUpdFields. This ensures that the typechecker sees
that the typechecking of the record update depends on the typechecking
of the pattern synonym, and typechecks the pattern synonyms first.
Not doing so caused #21898.

Note that this can be removed once GHC proposal #366 is implemented,
as we will be able to fully disambiguate the record update in the renamer,
and can immediately declare the correct used FreeVars instead of having
to over-estimate in case of ambiguity.

************************************************************************
*                                                                      *
\subsubsection{Literals}
*                                                                      *
************************************************************************

When literals occur we have to make sure
that the types and classes they involve
are made available.

References 1

Referenced by 2