My main concern is that many of the modules I import Proxy in already import Typeable.<div><br></div><div>So if we&#39;re going to pick up the functionality of having a &#39;standard&#39; Proxy, I&#39;d rather not lose the functionality of having it trivially Applicative, Eq, Ord, even Enum and Bounded, etc. makes it much easier to work with in practice, and useful for many situations you wouldn&#39;t immediately expect.</div>
<div><br></div><div>Yes, Typeable is Proxy-agnostic, but the moment you standardize on something like that the immediate second order consequence is I get 20 emails from people asking me why I&#39;m not using the standard one.</div>
<div><br></div><div>If we can agree to implement all the instances we can sanely implement for Proxy (and yes, there are a lot of non-obvious ones) then this is a non-issue.</div><div><br></div><div>If Proxy is just something where you intend to offer a minimalist interface explicitly for the narrow use case you&#39;ve currently envisioned, then I would ague that in my experience that assuming you know how something will be used is a great way to screw over users.</div>
<div><br></div><div>The existing Data.Proxy has been used as the representation of Data.Tagged as a representable profunctor. It serves as a trivial Applicative, etc.</div><div><br></div><div>If you add Proxy to Typeable, if its done by bringing the existing Data.Proxy module into base (sans a few of my more peculiar non-base instances) and then re-exporting it from Data.Typeable then my upgrade path is that I emit a new version of &#39;tagged&#39; without Proxy and I add version conditional exports of all of my other instances to those modules. Existing users of Data.Proxy can then easily support versions before and after GHC 7.7 and no functionality is lost.</div>
<div><br></div><div>If you add Proxy to Typeable and do not do so, then it is less than useful to me as it fragments the existing users between two different types, and gives me no story for how I straddle support for pre 7.7 and post-7.7 GHC. I am locked into a choice between two options:</div>
<div><br></div><div>1.) Continuing to support Data.Proxy, which is now completely redundant except for the fact that I have more instances for standard types.</div><div><br></div><div>2.) If I choose to pay the price of losing the existing functionality in order to accept a more &quot;standard&quot; version of the type, by having me re-export it from Data.Proxy in GHC &gt; 7.7 then I lose existing functionality or have to orphan a ton of instances.</div>
<div><br></div><div>Perhaps my explanation being so long winded has made it seem more complicated than it is, but really it just comes down to me asking that if you want Data.Proxy in Typeable, then please make sure to implement <i>all</i> the instances. =)</div>
<div><br></div><div>-Edward<br><br><div class="gmail_quote">On Wed, Mar 20, 2013 at 5:17 AM, Roman Cheplyaka <span dir="ltr">&lt;<a href="mailto:roma@ro-che.info" target="_blank">roma@ro-che.info</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Right now Data.Typeable is proxy-agnostic. The proposal is just to<br>
export a Proxy type for convenience (alternatively, the user can define<br>
her own Proxy or use one from tagged).<br>
What exactly forces you to support both proxies in your code?<br>
<br>
(I&#39;m reluctant to have many proxy types scattered around mainly because<br>
of unnecessary name conflicts, but I&#39;d like to understand your concerns<br>
too.)<br>
<br>
Roman<br>
<br>
* Edward Kmett &lt;<a href="mailto:ekmett@gmail.com">ekmett@gmail.com</a>&gt; [2013-03-20 04:48:49-0400]<br>
<div class="im">&gt; If you insist on adding Proxy to Data.Typeable, I&#39;d like to strongly<br>
&gt; suggest that we might want to look at promoting Data.Proxy from the tagged<br>
&gt; package to base.<br>
&gt;<br>
&gt; It offers a lot of instances that I currently rely upon in production code<br>
&gt; and is already in use in a large portion of the ~42 reverse dependencies of<br>
&gt; that package:<br>
&gt;<br>
&gt; <a href="http://packdeps.haskellers.com/reverse/tagged" target="_blank">http://packdeps.haskellers.com/reverse/tagged</a><br>
&gt;<br>
&gt; Of course we could invert the dependencies from packages outside of base at<br>
&gt; that time.<br>
&gt;<br>
</div>&gt; Exporting a crippled Proxy from Data.Typeable *without* those instances<br>
<div class="HOEnZb"><div class="h5">&gt; will basically just ensure that I need to somehow support both, fight<br>
&gt; needlessly with orphans and/or deal with qualified imports everywhere, and<br>
&gt; it will break about 3 dozen modules of mine, and impact others.<br>
&gt;<br>
&gt; All in all this makes me personally rather strongly opposed to the idea of<br>
&gt; just randomly throwing a Proxy type in the module without ensuring we don&#39;t<br>
&gt; lose existing functionality along the way.<br>
&gt;<br>
&gt; -Edward<br>
&gt;<br>
&gt; On Wed, Mar 20, 2013 at 4:04 AM, José Pedro Magalhães &lt;<a href="mailto:jpm@cs.uu.nl">jpm@cs.uu.nl</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; Data.Typeable no longer uses Proxy, yet I think it is convenient to have a<br>
&gt; &gt; Proxy datatype<br>
&gt; &gt; defined somewhere in base, and re-export it from Data.Typeable, as you<br>
&gt; &gt; might often often<br>
&gt; &gt; want to use it.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Cheers,<br>
&gt; &gt; Pedro<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; On Wed, Mar 20, 2013 at 12:35 AM, Edward Kmett &lt;<a href="mailto:ekmett@gmail.com">ekmett@gmail.com</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt;&gt; +1 for finding a resolution. The idea of another Proxy floating around<br>
&gt; &gt;&gt; fills me with unease.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; -Edward<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; On Tue, Mar 19, 2013 at 7:48 PM, Ben Gamari &lt;<a href="mailto:bgamari.foss@gmail.com">bgamari.foss@gmail.com</a>&gt;wrote:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;&gt; José Pedro Magalhães &lt;<a href="mailto:jpm@cs.uu.nl">jpm@cs.uu.nl</a>&gt; writes:<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; &gt; Yes, it&#39;s entirely unproblematic, and a good suggestion.<br>
&gt; &gt;&gt;&gt; &gt;<br>
&gt; &gt;&gt;&gt; What happened to this proposal? As far as I can tell the new-typeable<br>
&gt; &gt;&gt;&gt; work is in (or rather, the branch has been deleted) yet Data.Typeable<br>
&gt; &gt;&gt;&gt; still seems to have its own Proxy. Given that there has been talk of a<br>
&gt; &gt;&gt;&gt; 7.8 release, this should probably be resolved quickly (although it&#39;s not<br>
&gt; &gt;&gt;&gt; clear to me from the massive thread where that discussion concluded).<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; Cheers,<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; - Ben<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; _______________________________________________<br>
&gt; &gt;&gt;&gt; Libraries mailing list<br>
&gt; &gt;&gt;&gt; <a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
&gt; &gt;&gt;&gt; <a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/mailman/listinfo/libraries</a><br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;<br>
<br>
&gt; _______________________________________________<br>
&gt; Libraries mailing list<br>
&gt; <a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
&gt; <a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/mailman/listinfo/libraries</a><br>
<br>
</div></div></blockquote></div><br></div>