[commit: ghc] wip/T9023: Make the matcher and wrapper Ids in PatSyn into LocalIds, not GlobalIds (7ef8dd5)
git at git.haskell.org
git at git.haskell.org
Mon Jun 23 13:14:59 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T9023
Link : http://ghc.haskell.org/trac/ghc/changeset/7ef8dd532674cc046c4df80c4768756be736172f/ghc
>---------------------------------------------------------------
commit 7ef8dd532674cc046c4df80c4768756be736172f
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.
Conflicts:
compiler/typecheck/TcRnTypes.lhs
utils/haddock
>---------------------------------------------------------------
7ef8dd532674cc046c4df80c4768756be736172f
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 7ef8dd532674cc046c4df80c4768756be736172f
More information about the ghc-commits
mailing list