Skip to content
  • Facundo Domínguez's avatar
    Don't ignore addTopDecls in module finalizers. · a77bbb8b
    Facundo Domínguez authored and Ben Gamari's avatar Ben Gamari committed
    Summary:
    Module finalizer could call addTopDecls, however, the declarations
    added in this fashion were ignored. This patch makes sure to rename,
    type check and incorporate this declarations.
    
    Because a declaration may include a splice which calls addModFinalizer,
    the list of finalizers is repeteadly checked after adding declarations
    until no more finalizers remain.
    
    Test Plan: ./validate
    
    Reviewers: bgamari, goldfire, simonpj, austin
    
    Reviewed By: bgamari, simonpj
    
    Subscribers: simonmar, mboes, thomie
    
    Differential Revision: https://phabricator.haskell.org/D2505
    
    GHC Trac Issues: #12559
    
    (cherry picked from commit 71dd6e44)
    a77bbb8b