[commit: ghc] master: Make unique auxiliary function names in deriving (895eefa)
git at git.haskell.org
git at git.haskell.org
Tue Jul 5 15:20:21 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/895eefa8447a2886e77fdedcbca8047263c88db7/ghc
>---------------------------------------------------------------
commit 895eefa8447a2886e77fdedcbca8047263c88db7
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Tue Jul 5 13:46:29 2016 +0100
Make unique auxiliary function names in deriving
In deriving for Data, we make some auxiliary functions, but they
didn't always get distinct names (Trac #12245). This patch fixes
it by using the same mechanism as for dictionary functions, namely
chooseUniqueOccTc.
Some assocated refactoring came along for the ride.
>---------------------------------------------------------------
895eefa8447a2886e77fdedcbca8047263c88db7
compiler/basicTypes/OccName.hs | 21 +--
compiler/typecheck/TcDeriv.hs | 76 ++++-------
compiler/typecheck/TcGenDeriv.hs | 151 ++++++++++++++--------
compiler/typecheck/TcGenGenerics.hs | 49 +++----
testsuite/tests/deriving/should_compile/T12245.hs | 12 ++
testsuite/tests/deriving/should_compile/all.T | 2 +-
6 files changed, 168 insertions(+), 143 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 895eefa8447a2886e77fdedcbca8047263c88db7
More information about the ghc-commits
mailing list