Ticket #3501 (closed bug: fixed)

Opened 4 years ago

Last modified 3 years ago

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 Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

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

Changed 4 years ago by simonmar

  • failure set to Runtime performance bug

Changed 3 years ago by simonpj

  • status changed from new to closed
  • resolution set to fixed

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

Simon

Note: See TracTickets for help on using tickets.