[commit: ghc] master: Pattern-synonym matcher and builder Ids must be *LocalIds* (fbb42b2)

git at git.haskell.org git at git.haskell.org
Mon Dec 15 10:06:03 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/fbb42b2ea42b6467135f26db47d9c296e7ad75a3/ghc

>---------------------------------------------------------------

commit fbb42b2ea42b6467135f26db47d9c296e7ad75a3
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Sat Dec 13 22:47:01 2014 +0000

    Pattern-synonym matcher and builder Ids must be *LocalIds*
    
    This easy-to-make mistake meant that pattern-synonym matcher and
    builder Ids weren't being treated as locally defined by the simpplier.
    That meant that we never looked up them up in the environment, got an
    out-of-date unfolding, which made the Simplifier fall into an infinite
    loop.  This was the cause of Trac #98587, but it was quite tricky to
    find!
    
    In a separate patch I'll make Lint check for locally-bound GlobalIds,
    since they are always an error.


>---------------------------------------------------------------

fbb42b2ea42b6467135f26db47d9c296e7ad75a3
 compiler/basicTypes/Id.hs                      |   5 +-
 compiler/typecheck/TcPatSyn.hs                 |   7 +-
 testsuite/tests/patsyn/should_compile/T9857.hs | 162 +++++++++++++++++++++++++
 testsuite/tests/patsyn/should_compile/all.T    |   1 +
 4 files changed, 172 insertions(+), 3 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 fbb42b2ea42b6467135f26db47d9c296e7ad75a3


More information about the ghc-commits mailing list