
7 Jan
2012
7 Jan
'12
5:37 a.m.
On Sat, Jan 7, 2012 at 8:06 AM, Greg Weber
I am wondering if you can provide even higher-level APIs for the common case:
hash <- runResourceT $ hashFile "my-file"
and possibly something that runs the ResourceT transformer:
hash <- runHashFile "my-file"
That's dead simple to add, I just wonder which ones should be added (since triplicating the whole API wouldn't be fun). So you're assuming that hashing is the most common case of the library, right? Now, having 'hashFile' inside ResourceT isn't terribly useful and if the user needs it, it's trivial to implement, so I'm thinking of just exporting a single new function: hashFile :: (MonadIO m, Hash ctx d) => FilePath -> m d I'll include it on the next version. =) Cheers, -- Felipe.