[Haskell-cafe] [web-devel] [ANNOUNCE] First release of crypto-conduit

Felipe Almeida Lessa felipe.lessa at gmail.com
Sat Jan 7 11:37:18 CET 2012

On Sat, Jan 7, 2012 at 8:06 AM, Greg Weber <greg at gregweber.info> wrote:
> 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. =)



More information about the Haskell-Cafe mailing list