#1645: {-# SPECIALIZE #-} doesn't
-----------------------+----------------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.7
Severity: normal | Keywords:
Difficulty: Unknown | Os: MacOS X
Testcase: | Architecture: x86
-----------------------+----------------------------------------------------
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.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1645>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs