Skip to content
  • Alan Zimmerman's avatar
    Make type import/export API Annotation friendly · 0d1cb157
    Alan Zimmerman authored
    Summary:
    At the moment an export of the form
    
       type C(..)
    
    is parsed by the rule
    
    ```
      |  'type' oqtycon           {% amms (mkTypeImpExp (sLL $1 $> (unLoc $2)))
                                         [mj AnnType $1,mj AnnVal $2] }
    ```
    
    This means that the origiinal oqtycon loses its location which is then retained
    in the AnnVal annotation.
    
    The problem is if the oqtycon has its own annotations, these get lost.
    
    e.g. in
    
      type (?)(..)
    
    the parens annotations for (?) get lost.
    
    This patch adds a wrapper around the name in the IE type to
    
    (a) provide a distinct location for the adornment annotation and
    
    (b) identify the specific adornment, for use in the pretty printer rather than
    occName magic.
    
    Updates haddock submodule
    
    Test Plan: ./validate
    
    Reviewers: mpickering, dfeuer, bgamari, austin
    
    Reviewed By: dfeuer
    
    Subscribers: dfeuer, thomie, mpickering
    
    Differential Revision: https://phabricator.haskell.org/D3016
    
    GHC Trac Issues: #13163
    0d1cb157