3 ms·
Yeah, that's what my second gripe was meant to complain about. Really, withFile :: FilePath -> IOMode -> (Handle -> IO r) -> IO r is just a more general
by ben0x539 4y ago
Yeah, that's what my second gripe was meant to complain about. Really,
withFile :: FilePath -> IOMode -> (Handle -> IO r) -> IO r
is just a more general way of writing
withFile :: FilePath -> IOMode -> (Handle -> IO Handle) -> IO Handle
;)
I've also heard about the ResourceT monad transformer but as of right now I don't think I could explain what it does or judge how well it does it, maybe that's also a sufficient solution.
- tome 4y agoAh sure, fine, but see https://news.ycombinator.com/item?id=35345367 https://news.ycombinator.com/item?id=35345367