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

Antoine Latter aslatter at gmail.com
Sun Jan 8 05:24:49 CET 2012

On Sat, Jan 7, 2012 at 10:12 PM, Aristid Breitkreuz
<aristidb at googlemail.com> wrote:
> 2012/1/8 Vincent Hanquez <tab at snarc.org>:
>> What would you prefer ?
>> At the moment, i'm inclined to someday move cryptohash apis to be similar to
>> crypto-api. i.e. from a result type being a bytestring to an opaque type
>> with serialize/show instance.
> Why? I don't actually need the hash object for anything, usually. All
> I need is the ByteString, and then I need to learn how to use the
> cereal package to get it...
> So talking purely about convenience, I would prefer hash :: HashType
> -> InputData -> ByteString. That would probably not be extensible
> enough, so I'm not sure how to optimally do it.

You could use 'hash :: Hash h => Proxy h -> ByteString -> ByteString'.

where 'data Proxy a = Proxy'. Defined for you in the 'tagged' package.


More information about the Haskell-Cafe mailing list