
22 Mar
2004
22 Mar
'04
10:31 a.m.
"Arjan van IJzendoorn"
newtype Method = Method String getMethod = Method "GET" putMethod = Method "PUT" doMeth getMethod = ... doMeth putMethod = ...
You will have to write:
doMeth (Method "GET") = ... doMeth (Method "PUT") = ...
Or (I assume, haven't tested) if you insist on renaming the methods: doMeth m | m == getMethod = ... | m == putMethod = ... (or using a case statement, of course) -kzm -- If I haven't seen further, it is by standing in the footprints of giants