Renamer now preserves location for IEThingWith list items
authorAlan Zimmerman <alan.zimm@gmail.com>
Fri, 15 Sep 2017 18:35:51 +0000 (14:35 -0400)
committerBen Gamari <ben@smart-cactus.org>
Tue, 19 Sep 2017 20:34:59 +0000 (16:34 -0400)
commita153d2f26263181440156380559a90ab792d8260
tree87ae3e28492cc730e85aa7962454c6ce3f36b20e
parentfb5190185b6819ff4f4b64167d37da85337c524c
Renamer now preserves location for IEThingWith list items

Prior to this, in the RenamedSource for

    module Renaming.RenameInExportedType
      (
      MyType (NT)
      ) where

    data MyType = MT Int | NT

The (NT) was given the location of MyType earlier on the line in the
export list.

Also the location was discarded for any field labels, and replaced with
a `noLoc`.

Test Plan: ./validate

Reviewers: bgamari, austin

Reviewed By: bgamari

Subscribers: rwbarton, thomie

GHC Trac Issues: #14189

Differential Revision: https://phabricator.haskell.org/D3968

(cherry picked from commit 9498c50ef5af2680305e0aaea6f32439cacc3da0)
compiler/typecheck/TcRnExports.hs
testsuite/tests/parser/should_compile/T14189.hs [new file with mode: 0644]
testsuite/tests/parser/should_compile/T14189.stderr [new file with mode: 0644]
testsuite/tests/parser/should_compile/all.T