Ticket #1645 (closed bug: fixed)

Opened 6 years ago

Last modified 4 years ago

{-# SPECIALIZE #-} doesn't

Reported by: guest Owned by:
Priority: normal Milestone: 6.12.1
Component: Compiler Version: 6.7
Keywords: Cc: lennart@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I would expect doing

{-# SPECIALIZE f :: T #-}
f :: U
f = ...

to create a specialized version of f that is the same as if I had written

f :: T
f = ...

But this is not the case. In the attached example the qsort function is SPECIALIZEd, and the specialized version is called QS.qsort1 in the core dump. The qsort1 function contains all kinds of dictionary manipulation that is not there when using the special type as a type signature.

This pretty much defeats the purpose of SPECIALIZE.

To test, unzip, untar, read Main.hs on how to compile.

Attachments

all.tgz Download (3.6 KB) - added by guest 6 years ago.

Change History

Changed 6 years ago by guest

Changed 6 years ago by guest

  • cc lennart@… added

Changed 6 years ago by igloo

  • milestone set to 6.10 branch

Thanks for the report!

Changed 6 years ago by simonpj

I think this is fixed (in the HEAD at least). It was another symptom of #1643

Lennart: can you confirm and close?

Simon

Changed 6 years ago by simonmar

  • os changed from MacOS X to Multiple
  • architecture changed from x86 to Multiple

Changed 5 years ago by simonmar

  • architecture changed from Multiple to Unknown/Multiple

Changed 5 years ago by simonmar

  • os changed from Multiple to Unknown/Multiple

Changed 4 years ago by igloo

  • milestone changed from 6.10 branch to 6.12.1

Testcase is attached, so let's verify+close this one.

Changed 4 years ago by simonmar

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

Took a quick look: seems ok now. There's a remaining reference to an Ord dictionary with 6.10.2, but that's gone in the HEAD.

Note: See TracTickets for help on using tickets.