
specialize only fires on functions that have type class constraints / are
part of a type class. Furthermore, the function needs to be marked
INLINEABLE or INLINE for specialization to work (unless the specialize
pragma was written in the defining module)
not sure if that helps,
cheers
-Carter
On Thu, Nov 7, 2013 at 7:17 PM, Evan Laforge
On Thu, Nov 7, 2013 at 11:11 AM, crockeea
wrote: I got this error with a small example, so I thought I'd post it for you. I could only get it to work when split over two files.
Mine is similar, sorry I've been lazy about getting a small reproduction, I assumed it wasn't too important.
I have a generic library that uses Data.Vector.Generic, along with a bunch of SPECIALIZE and INLINEABLE for a particular monomorphic Unboxed use. I don't know about the INLINEABLE, but the SPECIALIZE does wonders for performance, otherwise it doesn't notice that the operation can be unboxed.
So it's a bit worrisome to me if the SPECIALIZEs aren't firing. I did profiling before and they made my vector operations fall off of the expensive list, but that was before upgrading ghc and getting the new error msgs.
Would it be useful for me to boil down my example too, or is this one enough to work on? Mine is simpler in that it specializes to a monomorphic Storable.Vector Double. _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users