diff options
author | Shayan-Najd <sh.najd@gmail.com> | 2018-11-22 01:23:29 +0000 |
---|---|---|
committer | Alan Zimmerman <alan.zimm@gmail.com> | 2018-11-24 12:30:21 +0200 |
commit | 509d5be69c7507ba5d0a5f39ffd1613a59e73eea (patch) | |
tree | b3db08f371014cbf235525843a312f67dea77354 /compiler/utils/Binary.hs | |
parent | ad2d7612dbdf0e928318394ec0606da3b85a8837 (diff) | |
download | haskell-509d5be69c7507ba5d0a5f39ffd1613a59e73eea.tar.gz |
[TTG: Handling Source Locations] Foundation and Pat
This patch removes the ping-pong style from HsPat (only, for now),
using the plan laid out at
https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow/HandlingSourceLocations (solution
A).
- the class `HasSrcSpan`, and its functions (e.g., `cL` and `dL`), are introduced
- some instances of `HasSrcSpan` are introduced
- some constructors `L` are replaced with `cL`
- some patterns `L` are replaced with `dL->L` view pattern
- some type annotation are necessarily updated (e.g., `Pat p` --> `Pat (GhcPass p)`)
Phab diff: D5036
Trac Issues #15495
Updates haddock submodule
Diffstat (limited to 'compiler/utils/Binary.hs')
-rw-r--r-- | compiler/utils/Binary.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/utils/Binary.hs b/compiler/utils/Binary.hs index 9e8133e5e8..c8b4989bf3 100644 --- a/compiler/utils/Binary.hs +++ b/compiler/utils/Binary.hs @@ -1137,7 +1137,7 @@ instance Binary StringLiteral where fs <- get bh return (StringLiteral st fs) -instance Binary a => Binary (GenLocated SrcSpan a) where +instance Binary a => Binary (Located a) where put_ bh (L l x) = do put_ bh l put_ bh x |