You essentially forced me to do this. ;-)<div><br></div><div>So here it is, my initial version of http-types: <meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="https://github.com/aristidb/http-types">https://github.com/aristidb/http-types</a></div>

<div><br></div><div><a href="https://github.com/aristidb/http-types"></a>Only Method is supported for now.</div><div><br></div><div>I deliberately chose to make it an ADT for type safety reasons. This is to enable developers to write case x of POST -&gt; ..., and the compiler will find if they accidentally typed POSTX. However, non-standard methods are also supported via OtherMethod.</div>

<div><br></div><div>Please take it apart and criticize! :-)</div><div><br></div><div>If you have implementation ideas, just fork it, or I can add you as a contributor.</div><div><br></div><div><br></div><div>Aristid</div>

<div><br><br><div class="gmail_quote">2011/2/2 Michael Snoyman <span dir="ltr">&lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

I think there&#39;s general consensus that this package would be a Good<br>
Thing(tm), and at the least you&#39;ll have my support on it. I&#39;m sure we<br>
can all quibble on details later, but I think the best thing now would<br>
be to have some actual code to look at.<br>
<br>
Aristid, I&#39;m assuming (hoping) you were volunteering to actually write<br>
and maintain this package, is that correct? I would recommend you get<br>
a project started (Github, BitBucket, PatchTag, wherever), getting up<br>
some code and then we can all nit-pick it to death ;).<br>
<br>
Michael<br>
<br>
On Wed, Feb 2, 2011 at 3:45 PM, Aristid Breitkreuz<br>
<div><div></div><div class="h5">&lt;<a href="mailto:aristidb@googlemail.com">aristidb@googlemail.com</a>&gt; wrote:<br>
&gt; http-enumerator could at least for compatibility support a Request type with<br>
&gt; ByteString. And also a native request type. Or something along these lines.<br>
&gt; The problem is that I want to be able to use a Request type that is<br>
&gt; compatible between multiple client libraries, enabling me to theoretically<br>
&gt; switch implementations without a huge amount of hassle.<br>
&gt;<br>
&gt; Aristid<br>
&gt;<br>
&gt; 2011/2/2 Michael Snoyman &lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Wed, Feb 2, 2011 at 2:50 PM, Aristid Breitkreuz<br>
&gt;&gt; &lt;<a href="mailto:aristidb@googlemail.com">aristidb@googlemail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; I agree with most things.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; 2011/2/2 Michael Snoyman &lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; * Request and response datatypes themselves. I don&#39;t think this makes<br>
&gt;&gt; &gt;&gt; sense to put in http-types: just between WAI and http-enumerator I<br>
&gt;&gt; &gt;&gt; needed different versions of these.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I think this is where we could derive most value, and it would be good<br>
&gt;&gt; &gt; to<br>
&gt;&gt; &gt; find a way to do it.<br>
&gt;&gt; &gt; Request actually looks pretty similar in WAI as in http-enumerator, but<br>
&gt;&gt; &gt; Response is different. Maybe distinguish between client and server<br>
&gt;&gt; &gt; versions<br>
&gt;&gt; &gt; of Response?<br>
&gt;&gt;<br>
&gt;&gt; I&#39;d be very surprised if those two can be meaningfully unified. What<br>
&gt;&gt; do you do about remoteHost and errorHandler? Also, it&#39;s more useful to<br>
&gt;&gt; have the request body for http-enumerator be an Enumerator of<br>
&gt;&gt; Builders, as opposed to WAI where we want an Enumerator of<br>
&gt;&gt; ByteStrings.<br>
&gt;&gt;<br>
&gt;&gt; I have no opposition to *having* a Request type in http-types (or<br>
&gt;&gt; whatever we call it), but I doubt anyone will actually use it, and I<br>
&gt;&gt; wouldn&#39;t even want it to include Builder due to the extra dependency.<br>
&gt;&gt;<br>
&gt;&gt; Michael<br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br></div>