On Thu, 26 Mar 2009, Xiao-Yong Jin wrote:
So I have another question. Is the following function safe and legitimate?safeDiv :: (Exception e, Integral a) => a -> a -> Either e a safeDiv x y = unsafePerformIO . try . evaluate $ div x yI believe it should be okay to use this 'safeDiv'. What do
I think that question is wrong way around. The real question is, why do you want to solve your problem using unsafePerformIO?
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
