Ticket #1645 (closed bug: fixed)
{-# 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
Change History
Note: See
TracTickets for help on using
tickets.

