[commit: ghc] master: Give lookupGRE_Name a better API (3e0af46)
git at git.haskell.org
git at git.haskell.org
Thu Jun 23 09:16:00 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/3e0af469c97d34bea92032d54d155afc65bd4b20/ghc
>---------------------------------------------------------------
commit 3e0af469c97d34bea92032d54d155afc65bd4b20
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Thu Jun 23 08:47:31 2016 +0100
Give lookupGRE_Name a better API
lookupGRE_Name should return either zero or one GREs, never
several. This is a consequence of INVARIANT 1 on GlobalRdrEnv.
So it's better if it returns a Maybe; the panic on multiple results
is put in one place, instead of being scattered or ignored.
Just refactoring, no change in behaviour
>---------------------------------------------------------------
3e0af469c97d34bea92032d54d155afc65bd4b20
compiler/basicTypes/RdrName.hs | 16 +++++++++++-----
compiler/main/InteractiveEval.hs | 3 +--
compiler/rename/RnEnv.hs | 2 +-
compiler/rename/RnNames.hs | 4 ++--
compiler/rename/RnPat.hs | 7 ++++---
compiler/rename/RnSource.hs | 10 +++++-----
compiler/typecheck/FamInst.hs | 2 +-
compiler/typecheck/TcDeriv.hs | 2 +-
compiler/typecheck/TcErrors.hs | 2 +-
compiler/typecheck/TcForeign.hs | 2 +-
10 files changed, 28 insertions(+), 22 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 3e0af469c97d34bea92032d54d155afc65bd4b20
More information about the ghc-commits
mailing list