Skip to content
  • Simon Peyton Jones's avatar
    Fix Trac #2412: type synonyms and hs-boot recursion · 1fa3580c
    Simon Peyton Jones authored
    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
    
    1fa3580c