#3955: occasional stray "mkUsageInfo" output
---------------------------------------------+------------------------------
  Reporter:  dmwit                           |          Owner:  simonpj       
      Type:  bug                             |         Status:  closed        
  Priority:  normal                          |      Milestone:  6.12.3        
 Component:  Compiler                        |        Version:  6.12.1        
Resolution:  fixed                           |       Keywords:                
Difficulty:                                  |             Os:  Linux         
  Testcase:  typecheck/should_compile/T3955  |   Architecture:  x86_64 (amd64)
   Failure:  Other                           |  
---------------------------------------------+------------------------------
Changes (by simonpj):

  * status:  new => closed
  * resolution:  => fixed


Comment:

 Fixed by
 {{{
 Fri Apr  9 17:37:10 BST 2010  [email protected]
   * Fix Trac #3955: renamer and type variables

   The renamer wasn't computing the free variables of a type declaration
   properly.  This patch refactors a bit, and makes it more robust,
   fixing #3955 and several other closely-related bugs.  (We were
   omitting some free variables and that could just possibly lead to a
   usage-version tracking error.

     M ./compiler/rename/RnEnv.lhs -3 +11
     M ./compiler/rename/RnSource.lhs -43 +38
 }}}
 Then I made the mkUsageInfo warning into a panic
 {{{
 Thu May  6 17:38:13 BST 2010  [email protected]
   * Make a missing name in mkUsageInfo into a panic

   We really want to know about this!

     M ./compiler/iface/MkIface.lhs -1 +1
 }}}
 But this revealed more bugs:

 {{{
 Thu May  6 17:27:19 BST 2010  [email protected]
   * Make tcg_dus behave more sanely; fixes a mkUsageInfo panic

   The tcg_dus field used to contain *uses* of type and class decls,
   but not *defs*.  That was inconsistent, and it really went wrong
   for Template Haskell bracket.  What happened was that
    foo = [d| data A = A
                    f :: A -> A
                    f x = x |]
   would find a "use" of A when processing the top level of the module,
   which in turn led to a mkUsageInfo panic in MkIface.  The cause was
   the fact that the tcg_dus for the nested quote didn't have defs for
   A.

     M ./compiler/basicTypes/NameSet.lhs -4 +5
     M ./compiler/rename/RnBinds.lhs -2 +2
     M ./compiler/rename/RnExpr.lhs -4 +5
     M ./compiler/rename/RnSource.lhs -27 +30
 }}}
 plus, I belive,
 {{{
 Thu May  6 17:41:35 BST 2010  [email protected]
   * Find the correct external ids when there's a wrapper

   We were failing to externalise the wrapper id for a function
   that had one.

     M ./compiler/main/TidyPgm.lhs -2 +9
 }}}
 (I'm not 100% sure of what this patch was about!)

 Simon

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