Thu Apr 10 01:49:30 PDT 2008  [EMAIL PROTECTED]
  * Ensure that arity is accurate in back end
  
  See Note [exprArity invariant] in CoreUtils.  In code generated by Happy
  I was seeing this after TidyPgm and CorePrep
  
        f :: Any
        f {arity 1} = id `cast` unsafe-co
  
  So f claimed to have arity 1 (because exprArity looked inside), but
  did not have any top-level lambdas (because its type is Any).  
  
  This triggered a slightly-obscure ASSERT failure in CoreToStg
  
  This patch 
        - makes exprArity trim the arity if the type is not a function
        - adds a stronger ASSERT in TidyPgm
  
  It's not the only way to solve this problem (see Note [exprArity invariant])
  but it's enough for now. 
  

    M ./compiler/coreSyn/CorePrep.lhs -2 +7
    M ./compiler/coreSyn/CoreUtils.lhs -14 +43
    M ./compiler/stgSyn/CoreToStg.lhs -1 +1

View patch online:
http://darcs.haskell.org/ghc/_darcs/patches/20080410084930-1287e-98899b094ec4a097d4048ddb613fdbf300661583.gz

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to