summaryrefslogtreecommitdiff
path: root/compiler/deSugar/Match.hs
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2015-05-06 08:05:11 -0500
committerAustin Seipp <austin@well-typed.com>2015-05-06 08:09:28 -0500
commitfb54b2c11cc7f2cfbafa35b6a1819d7443aa5494 (patch)
tree665925b1fbf240930ee6309fb6b89707923e254e /compiler/deSugar/Match.hs
parentfa0474da6954a3e57785fe703acc83e2fecef88f (diff)
downloadhaskell-fb54b2c11cc7f2cfbafa35b6a1819d7443aa5494.tar.gz
API Annotations : add Locations in hsSyn were layout occurs
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
Diffstat (limited to 'compiler/deSugar/Match.hs')
-rw-r--r--compiler/deSugar/Match.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/deSugar/Match.hs b/compiler/deSugar/Match.hs
index c8e30f18a7..5ea18a4470 100644
--- a/compiler/deSugar/Match.hs
+++ b/compiler/deSugar/Match.hs
@@ -791,7 +791,7 @@ one pattern, and match simply only accepts one pattern.
JJQC 30-Nov-1997
-}
-matchWrapper ctxt (MG { mg_alts = matches
+matchWrapper ctxt (MG { mg_alts = L _ matches
, mg_arg_tys = arg_tys
, mg_res_ty = rhs_ty
, mg_origin = origin })