
22 Feb
2011
22 Feb
'11
8:25 p.m.
On 23/02/11 10:35 AM, Edward Z. Yang wrote:
What you describe is one of the cases when a partial function is ok (though it's probably better to do something like:
giveMeThree x | x == 3 = True | otherwise = error "giveMeThree: not three"
It's frequently not possible, but if you can arrange your types so that the invalid values are not possible, even better.) ah that's good, I can give a helpful error message.
Still would like a way to test it though...