I am implementing HTTP and I have something like:

   newtype Method = Method String
   getMethod = Method "GET"
   putMethod = Method "PUT"

   [...]

   doMeth getMethod = ...
   doMeth putMethod = ...

GHC gives me a patter matches are overlapped
warning.

And when I run, I discover that pattern matching
is not actually happening.  getMethod is
always executed even though the method passed
is putMethod....

What am I doing wrong?

-Alex-

_________________________________________________________________
S. Alexander Jacobson                  mailto:[EMAIL PROTECTED]
tel:917-770-6565                       http://alexjacobson.com
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to