
2 Jul
2010
2 Jul
'10
6:48 p.m.
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/