<div dir="ltr">Hello,<br><br>This issue has been discussed before [1] and I got the impression all instances were going to be in the syb package and not in base. I think it&#39;s preferable to deal with the dubious instances issue [2] once SYB has been put into its own package, but maybe the &quot;standard&quot; instances could stay in base.<br>
<br>Regarding the naming issue: I would very much be in favor of entirely renaming SYB to Generics.SYB altogether. I think the current name doesn&#39;t make much sense (why Data? it doesn&#39;t really define a datastructure), and simply calling it Generics is too broad, given that this is only one of the libraries for generic programming around. This would also fit nicely with other (upcoming) libraries for generic programming.<br>

<br><br>Thanks,<br>Pedro<br><br>[1] <a href="http://thread.gmane.org/gmane.comp.lang.haskell.libraries/9738" target="_blank">http://thread.gmane.org/gmane.comp.lang.haskell.libraries/9738</a><br>[2] <a href="http://thread.gmane.org/gmane.comp.lang.haskell.libraries/9672">http://thread.gmane.org/gmane.comp.lang.haskell.libraries/9672</a><br>
<br><br><div class="gmail_quote">On Mon, Sep 1, 2008 at 00:02, Claus Reinke <span dir="ltr">&lt;<a href="mailto:claus.reinke@talk21.com" target="_blank">claus.reinke@talk21.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>Leaving Data.Generics.Basics in base while moving<br>
Data.Generics.Instances to syb raises the interesting issue of<br>
dealing with the accidental re-exports of Data.Generics.Instances<br>
from various places. Here is that list again (*):<br>
<br>
 &nbsp; &nbsp;$ find . -name &#39;*hs&#39; | grep -v _darcs | xargs grep -l &#39;Data.Generics&#39; | grep -v Generics<br>
 &nbsp; &nbsp;./array/Data/Array.hs<br>
 &nbsp; &nbsp;./base/Data/Typeable.hs<br>
 &nbsp; &nbsp;./bytestring/Data/ByteString/Internal.hs<br>
 &nbsp; &nbsp;./bytestring/Data/ByteString/Lazy/Internal.hs<br>
 &nbsp; &nbsp;./bytestring/Data/ByteString/Unsafe.hs<br>
 &nbsp; &nbsp;./containers/Data/IntMap.hs<br>
 &nbsp; &nbsp;./containers/Data/IntSet.hs<br>
 &nbsp; &nbsp;./containers/Data/Map.hs<br>
 &nbsp; &nbsp;./containers/Data/Sequence.hs<br>
 &nbsp; &nbsp;./containers/Data/Set.hs<br>
 &nbsp; &nbsp;./containers/Data/Tree.hs<br>
 &nbsp; &nbsp;./haskell-src/Language/Haskell/Syntax.hs<br>
 &nbsp; &nbsp;./network/Network/URI.hs<br>
 &nbsp; &nbsp;./packedstring/Data/PackedString.hs<br>
 &nbsp; &nbsp;./template-haskell/Language/Haskell/TH/Quote.hs<br>
 &nbsp; &nbsp;./template-haskell/Language/Haskell/TH/Syntax.hs<br>
<br>
And here is a brief scan of what each of these is doing. References<br>
to &#39;standard&#39; vs &#39;dubious&#39; Data instances are wrt the suggested split<br>
in [1], with some possible refinements:<br>
<br>
- array: the Data instance for Array could be moved into array,<br>
 &nbsp; &nbsp;avoiding the need for instance imports and syb dependency?<br>
<br>
- bytestring: uses deriving, which for Internal.hs depends on<br>
 &nbsp; &nbsp;Data instances for Int [standard] and (ForeignPtr Word8)<br>
 &nbsp; &nbsp;[dubious]; would need to depend on syb; and import both<br>
 &nbsp; &nbsp;standard and dubious instances :-(<br>
<br>
 &nbsp; &nbsp;perhaps Data instances for type constructors with phantom<br>
 &nbsp; &nbsp;types should be re-classified into Standard, given that there<br>
 &nbsp; &nbsp;are no data objects to be traversed?<br>
<br>
- containers: IntMap.hs, IntSet.hs, Map.hs, Sequencs.hs, Set.hs,<br>
 &nbsp; &nbsp;Tree.hs define their own Data instances, or derive them in such<br>
 &nbsp; &nbsp;a way that they do not need to import any instances :-)<br>
<br>
- haskell-src: uses deriving, will need to depend on syb; depends<br>
 &nbsp; &nbsp;almost exclusively on standard instances (the only exception I<br>
 &nbsp; &nbsp;can see in a quick scan is Rational);<br>
<br>
 &nbsp; &nbsp;perhaps this is an argument in favour of moving the Data instance<br>
 &nbsp; &nbsp;for &#39;Ratio a&#39; from Dubious to Standard: the parameter type is<br>
 &nbsp; &nbsp;never meant to be traversed, and tainting every client of &#39;Ratio a&#39;<br>
 &nbsp; &nbsp;with the really bad instances is not a good idea. Opinions?<br>
<br>
- network: uses deriving, will need to depend on syb; depends<br>
 &nbsp; &nbsp;only on standard instances<br>
<br>
- packedstring: defines its own instances, no need to import any<br>
<br>
- template-haskell: uses deriving, roughly the same situation as<br>
 &nbsp; &nbsp;for haskell-src?<br>
<br>
Claus<br>
<br>
[1] see the last page of<br>
 &nbsp; &nbsp;<a href="http://www.haskell.org/pipermail/libraries/2008-July/010313.html" target="_blank">http://www.haskell.org/pipermail/libraries/2008-July/010313.html</a><br>
[2] <a href="http://www.cs.kent.ac.uk/%7Ecr3/toolbox/haskell/#syb-utils" target="_blank">http://www.cs.kent.ac.uk/~cr3/toolbox/haskell/#syb-utils</a><br>
<br>
<br>
<br>
<br>
</div></div><div><div></div><div>_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/mailman/listinfo/libraries</a><br>
</div></div></blockquote></div><br></div>