From fb54b2c11cc7f2cfbafa35b6a1819d7443aa5494 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Wed, 6 May 2015 08:05:11 -0500 Subject: 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 --- compiler/deSugar/Match.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/deSugar/Match.hs') 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 }) -- cgit v1.2.1