[GHC] #7078: Panic using mixing list with parallel arrays incorrectly

GHC cvs-ghc at haskell.org
Fri Jul 20 12:58:34 CEST 2012


#7078: Panic using mixing list with parallel arrays incorrectly
-------------------------+--------------------------------------------------
    Reporter:  NeilJ     |       Owner:  chak              
        Type:  bug       |      Status:  new               
    Priority:  normal    |   Milestone:                    
   Component:  Compiler  |     Version:  7.4.1             
    Keywords:            |          Os:  Unknown/Multiple  
Architecture:  x86       |     Failure:  Compile-time crash
  Difficulty:  Unknown   |    Testcase:                    
   Blockedby:            |    Blocking:                    
     Related:            |  
-------------------------+--------------------------------------------------

Comment(by NeilJ):

 Replying to [comment:2 chak]:
 > GHC shouldn't panic, but instead give a proper error message, but the
 definition of transpose in Handy.hs is incorrect. It uses list pattern
 matching with `(:)` for parallel arrays. That is impossible as they are
 not inductively defined.

 Thanks for that.  Naive coding.  I have changed transposeP to this, and
 still get the same error.

 ansposeP !a = [: [:x !: i | x <- a:] | i <- [:0..l:]:]
     where l = (lengthP (a !: 0)) P.- 1

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



More information about the Glasgow-haskell-bugs mailing list