Skip to content
  • Matthew Pickering's avatar
    Store RdrName rather than OccName in Holes · 6d62f6bf
    Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
    In #20472 it was pointed out that you couldn't defer out of scope but
    the implementation collapsed a RdrName into an OccName to stuff it into
    a Hole. This leads to the error message for a deferred qualified name
    dropping the qualification which affects the quality of the error
    message.
    
    This commit adds a bit more structure to a hole, so a hole can replace a
    RdrName without losing information about what that RdrName was. This is
    important when printing error messages.
    
    I also added a test which checks the Template Haskell deferral of out of
    scope qualified names works properly.
    
    Fixes #22130
    6d62f6bf