{-# SPECIALIZE #-} doesn't
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.
Trac metadata
Trac field | Value |
---|---|
Version | 6.7 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | MacOS X |
Architecture | x86 |