[GHC] #10487: DeriveGeneric breaks when the same data name is used in different modules
GHC
ghc-devs at haskell.org
Thu Sep 24 07:50:29 UTC 2015
#10487: DeriveGeneric breaks when the same data name is used in different modules
-------------------------------------+-------------------------------------
Reporter: andreas.abel | Owner: osa1
Type: bug | Status: new
Priority: highest | Milestone: 8.0.1
Component: Compiler | Version: 7.10.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions: Phab:D1081
-------------------------------------+-------------------------------------
Comment (by Edward Z. Yang <ezyang@…>):
In [changeset:"b08a533dc87423a75bce037eb403d7828d3330d3/ghc" b08a533/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="b08a533dc87423a75bce037eb403d7828d3330d3"
Fix DeriveGeneric for types with same OccName (#10487)
Summary:
DeriveGeneric generates some data types (for data type constructors and
for
selectors of those constructors) and instances for those types. This patch
changes name generation for these new types to make it working with data
types
with same names imported from different modules and with data types with
same
names imported from same modules(using module imports).
Bonus content:
- Some refactoring in `TcGenGenerics.metaTyConsToDerivStuff` to remove
some
redundant partial function applications and to remove a duplicated
function.
- Remove some unused names from `OccName`. (those were used for an old
implementation of `DeriveGeneric`)
Reviewers: kosmikus, simonpj, dreixel, ezyang, bgamari, austin
Reviewed By: bgamari, austin
Subscribers: ezyang, thomie
Differential Revision: https://phabricator.haskell.org/D1081
GHC Trac Issues: #10487
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10487#comment:18>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list