• Alan Zimmerman's avatar
    API Annotations : add Locations in hsSyn were layout occurs · fb54b2c1
    Alan Zimmerman authored
    At the moment ghc-exactprint, which uses the GHC API Annotations to
    provide a framework for roundtripping Haskell source code with optional
    AST edits, has to implement a horrible workaround to manage the points
    where layout needs to be captured.
    
    These are
    
        MatchGroup
        HsDo
        HsCmdDo
        HsLet
        LetStmt
        HsCmdLet
        GRHSs
    
    To provide a more natural representation, the contents subject to layout
    rules need to be wrapped in a SrcSpan.
    
    This commit does this.
    
    Trac ticket #10250
    
    Reviewed By: austin
    
    Differential Revision: https://phabricator.haskell.org/D815
    
    GHC Trac Issues: #10250
    fb54b2c1
TcGenDeriv.hs 92.6 KB