Fix Trac #2412: type synonyms and hs-boot recursion
authorsimonpj@microsoft.com <unknown>
Mon, 11 Aug 2008 12:25:23 +0000 (12:25 +0000)
committersimonpj@microsoft.com <unknown>
Mon, 11 Aug 2008 12:25:23 +0000 (12:25 +0000)
Max Bolingbroke found this awkward bug, which relates to the way in
which hs-boot files are handled.

   --> HEADS UP: interface file format change: recompile everything!

When we import a type synonym, we want to *refrain* from looking at its
RHS until we've "tied the knot" in the module being compiled.  (Reason:
the type synonym might ultimately loop back to the module being compiled.)
To achieve this goal we need to know the *kind* of the synonym without
looking at its RHS.  And to do that we need its kind recorded in the interface
file.

I slightly refactored the way that the IfaceSyn data constructor
fields work, eliminating the previous tricky re-use of the same field
as either a type or a kind.

See Note [Synonym kind loop] in TcIface


No differences found