#3501: Error thunks not being exposed with "B" strictness
---------------------------------------+------------------------------------
  Reporter:  simonpj                   |          Owner:                  
      Type:  run-time performance bug  |         Status:  new             
  Priority:  normal                    |      Milestone:  6.14 branch     
 Component:  Compiler                  |        Version:  6.11            
  Severity:  normal                    |       Keywords:                  
Difficulty:  Unknown                   |       Testcase:                  
        Os:  Unknown/Multiple          |   Architecture:  Unknown/Multiple
---------------------------------------+------------------------------------
 At the moment GHC often floats `error "urk"` to the top level (which it
 should), after the strictness analyser.  But since it's ''after''
 strictness analysis, the exported thing doesn't have a strictness
 signature saying "I am a diverging term", which in turn loses useful
 optimisations in importing modules.

 An example is test T3286.  If you compile it with `-O --ddump-simpl`,
 you'll see stuff like
 {{{
      case T3286b.$fFractionalLogFloat3
           `cast` (CoUnsafe T3286b.LogFloat GHC.Prim.Double#
                   :: T3286b.LogFloat ~ GHC.Prim.Double#)
      of ww2_aGk { __DEFAULT ->
      (GHC.Types.D# ww2_aGk)
      `cast` (sym T3286b.NTCo:LogFloat
              :: GHC.Types.Double ~ T3286b.LogFloat)
 }}}
 But if you look at `T3286b.$fFractionalLogFloat3`, it turns out to be
 bottom, so the case should be eliminated.

 This is a long-standing infelicity; I'm making a ticket so I don't forget
 it.

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