[Haskell-cafe] ANNOUNCE: hs-cryptohash 0.4

John Meacham john at repetae.net
Fri Jul 2 14:48:00 EDT 2010


On Fri, Jul 02, 2010 at 08:10:19PM +1000, Ivan Lazar Miljenovic wrote:
> > The few existing packages that exposes the incremental API, usually do it
> > in the IO monad; cryptohash do it purely, creating a new context as it get updated.
> > (this has a cost but remains fast globally with the C implementation)
> >
> > i.e.
> > 	update : ctx -> bytestring -> IO ()
> > becomes:
> > 	update : ctx -> bytestring -> ctx
> 
> So you're using explicit state parsing?  Any particular reason for not
> using the State monad or something like that?

Not using the state monad allows explicit sharing/storing of the
context, which would be quite handy if you arn't hashing your whole
input in one go.

        John

-- 
John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/


More information about the Haskell-Cafe mailing list