[Haskell-cafe] ????Pattern match(es) are overlapped???

S. Alexander Jacobson alex at alexjacobson.com
Mon Mar 22 05:20:30 EST 2004

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

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?


S. Alexander Jacobson                  mailto:me at alexjacobson.com
tel:917-770-6565                       http://alexjacobson.com

More information about the Haskell-Cafe mailing list