#5892: Compiler crash and other oddities when using RecordWildCards with record
accessors not imported
--------------------------------+-------------------------------------------
 Reporter:  parcs               |          Owner:                  
     Type:  bug                 |         Status:  new             
 Priority:  normal              |      Component:  Compiler        
  Version:  7.4.1               |       Keywords:                  
       Os:  Unknown/Multiple    |   Architecture:  Unknown/Multiple
  Failure:  Compile-time crash  |       Testcase:                  
Blockedby:                      |       Blocking:                  
  Related:                      |  
--------------------------------+-------------------------------------------

Comment(by simonpj@…):

 commit 3e00d04619bb504e3cbe766eaf29e746d1211652
 {{{
 Author: Simon Peyton Jones <[email protected]>
 Date:   Sun Mar 4 09:41:52 2012 +0000

     Fix Trac #5892: a coding errors

     We had a lazy pattern
       gres@(gre:_) = blah
     and then a test for (null gres).  But I'd forgotten
     that a demand for *any* of variables in the pattern
     matches *all* of the variables in the entire pattern.
     So the test for (null gres) was matching the cons,
     which defeats the purpose.

  compiler/rename/RnPat.lhs |    8 ++++----
  1 files changed, 4 insertions(+), 4 deletions(-)
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5892#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to