[commit: ghc] ghc-7.8: Make the matcher and wrapper Ids in PatSyn into LocalIds, not GlobalIds (abb884f)
git at git.haskell.org
git at git.haskell.org
Thu Jul 3 22:26:21 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-7.8
Link : http://ghc.haskell.org/trac/ghc/changeset/abb884fba135b8f0e002ef9cd78311ed9afe521c/ghc
>---------------------------------------------------------------
commit abb884fba135b8f0e002ef9cd78311ed9afe521c
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Fri Jun 6 11:39:41 2014 +0100
Make the matcher and wrapper Ids in PatSyn into LocalIds, not GlobalIds
This was a serious bug, exposed by Trac #9175. The matcher and wrapper
must be LocalIds, like record selectors and dictionary functions, for
the reasons now documented in Note [Exported LocalIds] in Id.lhs
In fixing this I found
- PatSyn should have an Id inside it (apart from the wrapper and matcher)
It should be a Name. Hence psId --> psName, with knock-on consequences
- Tidying of PatSyns in TidyPgm was wrong
- The keep-alive set in Desugar.deSugar (now) doesn't need pattern synonyms
in it
I also cleaned up the interface to PatSyn a little, so there's a tiny knock-on
effect in Haddock; hence the haddock submodule update.
It's very hard to make a test for this bug, so I haven't.
(cherry picked from commit 7ac600d5fcd74db1f991555de6e415030970d5f3)
Conflicts:
utils/haddock
>---------------------------------------------------------------
abb884fba135b8f0e002ef9cd78311ed9afe521c
compiler/basicTypes/Id.lhs | 39 +++++++++++++-
compiler/basicTypes/MkId.lhs | 31 +++--------
compiler/basicTypes/PatSyn.lhs | 77 +++++++++++++++++-----------
compiler/deSugar/Desugar.lhs | 21 +++-----
compiler/deSugar/MatchCon.lhs | 2 +-
compiler/hsSyn/Convert.lhs | 2 +-
compiler/iface/MkIface.lhs | 4 +-
compiler/main/HscTypes.lhs | 20 ++------
compiler/main/TidyPgm.lhs | 52 +++++++++++--------
compiler/typecheck/TcEnv.lhs | 3 +-
compiler/typecheck/TcPat.lhs | 4 +-
compiler/typecheck/TcPatSyn.lhs | 5 +-
compiler/typecheck/TcRnDriver.lhs | 5 +-
compiler/typecheck/TcRnTypes.lhs | 4 +-
compiler/typecheck/TcSplice.lhs | 4 +-
compiler/typecheck/TcTyClsDecls.lhs | 7 ++-
compiler/vectorise/Vectorise/Monad/Naming.hs | 5 +-
17 files changed, 153 insertions(+), 132 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 abb884fba135b8f0e002ef9cd78311ed9afe521c
More information about the ghc-commits
mailing list