<p>Interesting idea. I don&#39;t really like that StdMethod cannot encode custom methos though.</p>
<p>data Method = Std StdMethod ¦ Ext ByteString</p>
<p>Might work. But is the complexity worth it? </p>
<p><blockquote type="cite">Am 04.02.2011 09:43 schrieb &quot;Christian Maeder&quot; &lt;<a href="mailto:Christian.Maeder@dfki.de">Christian.Maeder@dfki.de</a>&gt;:<br><br>Am 03.02.2011 22:42, schrieb Aristid Breitkreuz:<br>

<p><font color="#500050">&gt; Hi,<br>&gt; <br>&gt; I just wanted to announce that I uploaded a first version of http-types<br>&gt; to hackage:<br>&gt; <br>...</font></p>With your two types Method and MethodADT I would omit &quot;OtherMethod&quot; in<br>

MethodADT, since a mere enumeration type is much better:<br>
<br>
data StdMethod<br>
    = GET<br>
    | POST<br>
    | HEAD<br>
    | PUT<br>
    | DELETE<br>
    | TRACE<br>
    | CONNECT<br>
    | OPTIONS<br>
    deriving (Show, Eq, Ord, Enum, Bounded)<br>
<br>
method :: StdMethod -&gt; Method<br>
method = Ascii.pack . show<br>
<br>
methodListB :: [(Method, StdMethod)]<br>
methodListB = map (\ s -&gt; (method s, s))<br>
  [minBound .. maxBound]<br>
<br>
methodToStdMethod :: Method -&gt; Maybe StdMethod<br>
methodToStdMethod = flip lookup methodListB<br>
<br>
Cheers Christian<br>
</blockquote></p>