Oh, okay ^^ sorry, my bad. I should have compiled with -Wall.<br><br>So I started a repo at <a href="https://github.com/YwenP/bytestring-generic">https://github.com/YwenP/bytestring-generic</a><br><br><br><div class="gmail_quote">
Le 27 mars 2012 22:01, Bas van Dijk <span dir="ltr"><<a href="mailto:v.dijk.bas@gmail.com">v.dijk.bas@gmail.com</a>></span> a écrit :<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 27 March 2012 21:46, Yves Parès <<a href="mailto:yves.pares@gmail.com">yves.pares@gmail.com</a>> wrote:<br>
> Yes, thank you to remind me of that, I remember now having seen the project.<br>
> Strict ByteStrings being an alias to Vector Word8 is a good idea (are<br>
> bytestrings are already implemented exactly like<br>
> Data.Vector.Storable.Vector). But in that case we could use the API of<br>
> vector for bytestrings (the bytestring API would be provided only for<br>
> backwards compatibility, right?).<br>
<br>
</div>Yes, I hope that one day the bytestring package and the ByteString<br>
type will be deprecated in favor of vector and<br>
Data.Vector.Storable.Vector Word8 respectively. vector-bytestring is<br>
indeed intended as a package which should make the transition easier.<br>
<div class="im"><br>
> Does vector-bytestring plans to be the new implementation for bytestrings in<br>
> the end or is it a side-package?<br>
<br>
</div>I hope that once we get on par with bytestring's performance we can<br>
replace it (we're almost there!, Yell if you want to see some<br>
benchmark results).<br>
<div class="im"><br>
>> In an ideal world we would have a Lazy type family which for each type<br>
>> of vector would return its lazy version<br>
><br>
> What about a type like:<br>
><br>
> data Vector v a = Empty | Chuck {-# UNPACK #-} !(v a) (Vector v a)<br>
> ??<br>
<br>
</div>If you build with -Wall you'll see the following unfortunate warning:<br>
<br>
Warning: Ignoring unusable UNPACK pragma on the<br>
first argument of `Chunk'<br>
<br>
Johan Tibell recently discussed some of his ideas on how to solve this:<br>
<br>
<a href="http://www.haskell.org/pipermail/glasgow-haskell-users/2012-March/022079.html" target="_blank">http://www.haskell.org/pipermail/glasgow-haskell-users/2012-March/022079.html</a><br>
<br>
But for now we need to make a specialized type for every different<br>
vector type and use an associated type family to abstract over these<br>
different types.<br>
<br>
Regards,<br>
<br>
Bas<br>
</blockquote></div><br>