
13 Apr
2010
13 Apr
'10
6:02 a.m.
Cafe, Is there a way (without going into the IO lands) to achieve this: data T = A | B | C func1 :: T -> T func1 A = B func1Fixed :: T -> Maybe T func1Fixed A = Just B func1Fixed _ = Nothing I want a function to generate func1Fixed, given func1. I guess this is doable with exception handling (catching the error from func1)? Is it the only way? Best, -- Ozgur Akgun