• Facundo Domínguez's avatar
    Have addModFinalizer expose the local type environment. · 567dbd9b
    Facundo Domínguez authored
    This annotates the splice point with 'HsSpliced ref e' where 'e' is the
    result of the splice. 'ref' is a reference that the typechecker will fill with
    the local type environment.
    The finalizer then reads the ref and uses the local type environment, which
    causes 'reify' to find local variables when run in the finalizer.
    Test Plan: ./validate
    Reviewers: simonpj, simonmar, bgamari, austin, goldfire
    Reviewed By: goldfire
    Subscribers: simonmar, thomie, mboes
    Differential Revision: https://phabricator.haskell.org/D2286
    GHC Trac Issues: #11832
RnTypes.hs 68.7 KB