<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 6, 2013 at 11:22 AM, Herbert Valerio Riedel <span dir="ltr">&lt;<a href="mailto:hvr@gnu.org" target="_blank">hvr@gnu.org</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Michael Snoyman &lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt; writes:<br>
<br>
[...]<br>
<br>
</div><div class="im">&gt;&gt; An alternative would be to split the &quot;network&quot; package into<br>
&gt;&gt; &quot;network-uri&quot; and &quot;network-socket&quot;. Users of network-uri would have<br>
&gt;&gt; to switch to network-socket as well. However, the types of &quot;network&quot;<br>
&gt;&gt; and &quot;network-socket&quot; would be incompatible unless the<br>
&gt;&gt; &quot;network-socket&quot; package re-exports the modules from &quot;network&quot; or<br>
&gt;&gt; vice versa.<br>
&gt;&gt;<br>
&gt;&gt; E.g. could we put this into the &quot;network&quot; package:<br>
&gt;&gt;<br>
&gt;&gt; {-# LANGUAGE PackageImports #-}<br>
&gt;&gt; module Network.Socket ( module S )  where<br>
&gt;&gt;<br>
&gt;&gt; import qualified &quot;network-socket&quot; Network.Socket as S<br>
&gt;&gt;<br>
&gt;&gt; ?<br>
<br>
</div>[...]<br>
<div class="im"><br>
&gt; Recently, we have a similar situation with http-conduit. Based on that, I&#39;d<br>
&gt; recommend going for a conditional export situation.<br>
&gt;<br>
&gt; * Release a new version of network (1.5) that does not include the<br>
&gt;   Network.URI module.<br>
&gt; * Create a network-uri package that uses conditionals in the cabal file.<br>
&gt;     * If it&#39;s compiled against network version 1.4 or earlier, it doesn&#39;t<br>
&gt;       provide any modules.<br>
&gt;     * If it&#39;s compiled against network 1.5 or later, it provides the<br>
&gt;       Network.URI module.<br>
&gt;<br>
&gt; This way, there&#39;s only ever one package which is providing Network.URI.<br>
<br>
</div>[...]<br>
<br>
What&#39;s the actual downside with Henning&#39;s proposed package splitting<br>
method?<br>
<br>
I.e., the new transitional `network` package wouldn&#39;t have any visible<br>
changes in its exports (and so wouldn&#39;t require any major version bump),<br>
but its (re-exported) implementation gets moved into two new packages,<br>
`network-uri` and `network-socket`.<br>
<br>
So users of `network` which don&#39;t want to or can&#39;t switch yet to the new<br>
`network-{uri,socket}` packages can remain on `network` for the time<br>
being.<br>
<br>
After an appropriate deprecation cycle, the `network` packages doesn&#39;t<br>
get updated anymore to support newer major package versions of<br>
`network-{uri,socket}` which may then start to break compatibility<br>
significantly at the type-level.<br>
<br>
To me, this seems to avoid breaking the PVP contract, as well as<br>
avoiding requiring clients of `network` to introduce<br>
conditional-compilation directives. Moreover, it wouldn&#39;t require client<br>
packages to switch to new packages right away, while sharing the data<br>
types of the new `network-{socket,uri}` packages.<br>
<br>
Am I overlooking something?<br>
<br>
cheers,<br>
  hvr<br>
</blockquote></div><br></div><div class="gmail_extra" style>Well, that approach requires the creation of an extra package and ultimately deprecating the main package, forcing users to have to learn about a new package. I&#39;d rather not have to rename a package just because I want to split off one piece of functionality to a separate package.</div>

<div class="gmail_extra" style><br></div><div class="gmail_extra" style>Michael</div></div>