Replaced throw to throwIO where type is IO

Gregory Collins greg at gregorycollins.net
Sat Sep 25 11:34:19 EDT 2010


Bas van Dijk <v.dijk.bas at gmail.com> writes:

> throwIOs :: Int -> IO ()
> throwIOs 0 = return ()
> throwIOs n = throwIO DivideByZero `catch` \DivideByZero -> throws (n-1)

Should that perhaps be "throwIOs (n-1)" in the recursive case?

G
-- 
Gregory Collins <greg at gregorycollins.net>


More information about the Libraries mailing list