Opened 10 years ago

Closed 10 years ago

#3501 closed bug (fixed)

Error thunks not being exposed with "B" strictness

Reported by: simonpj Owned by:
Priority: normal Milestone: 6.14 branch
Component: Compiler Version: 6.11
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Runtime performance bug Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


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.

Change History (2)

comment:1 Changed 10 years ago by simonmar

Type of failure: Runtime performance bug

comment:2 Changed 10 years ago by simonpj

Resolution: fixed
Status: newclosed

I believe this is fixed in the HEAD at least. See Note [Bottoming floats] in SetLevels.


Note: See TracTickets for help on using tickets.