> newtype Method = Method String > getMethod = Method "GET" > putMethod = Method "PUT" > > [...] > > doMeth getMethod = ... > doMeth putMethod = ...
For Haskell the last two lines look both like pattern-matching on a variable which always matches. You might as well have written: doMeth x = ... doMeth y = ... There is no macro facility in Haskell so you cannot give patterns a name like you do in line 2 and 3. You will have to write: doMeth (Method "GET") = ... doMeth (Method "PUT") = ... Good luck, Arjan _______________________________________________ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe
