Skip to content
  • Vladislav Zavialov's avatar
    1a767fa3
    Add BufSpan to EpaLocation (#22319, #22558) · 1a767fa3
    Vladislav Zavialov authored and Marge Bot's avatar Marge Bot committed
    The key part of this patch is the change to mkTokenLocation:
    
    	- mkTokenLocation (RealSrcSpan r _)  = TokenLoc (EpaSpan r)
    	+ mkTokenLocation (RealSrcSpan r mb) = TokenLoc (EpaSpan r mb)
    
    mkTokenLocation used to discard the BufSpan, but now it is saved and can
    be retrieved from LHsToken or LHsUniToken.
    
    This is made possible by the following change to EpaLocation:
    
    	- data EpaLocation = EpaSpan !RealSrcSpan
    	+ data EpaLocation = EpaSpan !RealSrcSpan !(Strict.Maybe BufSpan)
    	                   | ...
    
    The end goal is to make use of the BufSpan in Parser/PostProcess/Haddock.
    1a767fa3
    Add BufSpan to EpaLocation (#22319, #22558)
    Vladislav Zavialov authored and Marge Bot's avatar Marge Bot committed
    The key part of this patch is the change to mkTokenLocation:
    
    	- mkTokenLocation (RealSrcSpan r _)  = TokenLoc (EpaSpan r)
    	+ mkTokenLocation (RealSrcSpan r mb) = TokenLoc (EpaSpan r mb)
    
    mkTokenLocation used to discard the BufSpan, but now it is saved and can
    be retrieved from LHsToken or LHsUniToken.
    
    This is made possible by the following change to EpaLocation:
    
    	- data EpaLocation = EpaSpan !RealSrcSpan
    	+ data EpaLocation = EpaSpan !RealSrcSpan !(Strict.Maybe BufSpan)
    	                   | ...
    
    The end goal is to make use of the BufSpan in Parser/PostProcess/Haddock.
Loading