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>
Fri, 15 Sep 2017 18:35:52 +0000 (14:35 -0400)
commit9498c50ef5af2680305e0aaea6f32439cacc3da0
treef1f28cbf64c3d174d89e2792feda6ce98516bba4
parent2bfba9e45f3d3272a44658aec987445647c7f2b7
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
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