<div dir="ltr">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)<div>

<br></div><div style>not sure if that helps,</div><div style><br></div><div style>cheers</div><div style>-Carter</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Nov 7, 2013 at 7:17 PM, Evan Laforge <span dir="ltr"><<a href="mailto:qdunkan@gmail.com" target="_blank">qdunkan@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Thu, Nov 7, 2013 at 11:11 AM, crockeea <<a href="mailto:ecrockett0@gmail.com">ecrockett0@gmail.com</a>> wrote:<br>


> I got this error with a small example, so I thought I'd post it for you. I<br>
> could only get it to work when split over two files.<br>
<br>
</div>Mine is similar, sorry I've been lazy about getting a small<br>
reproduction, I assumed it wasn't too important.<br>
<br>
I have a generic library that uses Data.Vector.Generic, along with a<br>
bunch of SPECIALIZE and INLINEABLE for a particular monomorphic<br>
Unboxed use.  I don't know about the INLINEABLE, but the SPECIALIZE<br>
does wonders for performance, otherwise it doesn't notice that the<br>
operation can be unboxed.<br>
<br>
So it's a bit worrisome to me if the SPECIALIZEs aren't firing.  I did<br>
profiling before and they made my vector operations fall off of the<br>
expensive list, but that was before upgrading ghc and getting the new<br>
error msgs.<br>
<br>
Would it be useful for me to boil down my example too, or is this one<br>
enough to work on?  Mine is simpler in that it specializes to a<br>
monomorphic Storable.Vector Double.<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
Glasgow-haskell-users mailing list<br>
<a href="mailto:Glasgow-haskell-users@haskell.org">Glasgow-haskell-users@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/glasgow-haskell-users" target="_blank">http://www.haskell.org/mailman/listinfo/glasgow-haskell-users</a><br>
</div></div></blockquote></div><br></div>