#6060: the 'impossible' happened
---------------------------------+------------------------------------------
    Reporter:  lerkok            |       Owner:                    
        Type:  bug               |      Status:  patch             
    Priority:  normal            |   Milestone:  7.6.1             
   Component:  Compiler          |     Version:  7.4.1             
    Keywords:                    |          Os:  Unknown/Multiple  
Architecture:  Unknown/Multiple  |     Failure:  Compile-time crash
  Difficulty:  Unknown           |    Testcase:                    
   Blockedby:                    |    Blocking:                    
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by simonpj@…):

 commit 67c793a3a13482bc897810e3b5e13f96942afc68
 {{{
 Author: Simon Peyton Jones <[email protected]>
 Date:   Tue May 1 08:07:52 2012 +0100

     Tidy up a remaining glitch in unification

     There was one place, in type checking parallel list comprehensions
     where we were unifying types, but had no convenient way to use the
     resulting coercion; instead we just checked that it was Refl.  This
     was Wrong Wrong; it might fail unpredicably in a GADT-like situation,
     and it led to extra error-generation code used only in this one place.

     This patch tidies it all up, by moving the 'return' method from the
     *comprehension* to the ParStmtBlock. The latter is a new data type,
     now used for each sub-chunk of a parallel list comprehension.

     Because of the data type change, quite a few modules are touched,
     but only in a fairly trivial way. The real changes are in TcMatches
     (and corresponding desugaring); plus deleting code from TcUnify.

     This patch also fixes the pretty-printing bug in Trac #6060

  compiler/deSugar/Coverage.lhs    |   14 ++++----
  compiler/deSugar/DsArrows.lhs    |    4 +-
  compiler/deSugar/DsListComp.lhs  |   39 ++++++++++-----------
  compiler/hsSyn/Convert.lhs       |    4 +-
  compiler/hsSyn/HsExpr.lhs        |   33 ++++++++++++------
  compiler/hsSyn/HsUtils.lhs       |   12 +++---
  compiler/main/HscMain.hs         |    4 +-
  compiler/parser/Parser.y.pp      |    3 +-
  compiler/rename/RnExpr.lhs       |   29 +++++++--------
  compiler/typecheck/TcErrors.lhs  |    8 ----
  compiler/typecheck/TcHsSyn.lhs   |   23 ++++++------
  compiler/typecheck/TcMatches.lhs |   70
 ++++++++++----------------------------
  compiler/typecheck/TcUnify.lhs   |   11 ------
  13 files changed, 104 insertions(+), 150 deletions(-)
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6060#comment:3>
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