
18 May
2013
18 May
'13
3:06 a.m.
I must say though that I'd rather prefer Adres solution because his init
init :: (forall a. Inotify a -> IO b) -> IO b
ensures that Inotify does not leak, and so can be disposed of at the end. So his init enforces the region discipline and could, after a
It's probably not easy to do this by accident, but I think "ensures" is too strong a word here.
Indeed. I should've been more precise and said that 'init' -- like Exception.bracket or System.IO.withFile -- are a good step towards ensuring the region discipline. One may wish that true regions were used for this project (as they have been for similar ones, like usb-safe).