[Haskell-cafe] [ANNOUNCE] hashable-generics

Clark Gaebel cgaebel at uwaterloo.ca
Sun Nov 4 17:47:37 CET 2012


Yes. Sorry if I wasn't clear. That's what I intended.

So would a patch adding this to hashable be accepted?

  - Clark


On Sun, Nov 4, 2012 at 11:39 AM, Johan Tibell <johan.tibell at gmail.com>wrote:

> On Sun, Nov 4, 2012 at 8:35 AM, Clark Gaebel <cgaebel at uwaterloo.ca> wrote:
> >
> > @dag:
> >
> > I would love for this to be merged into Data.Hashable, and I think it
> would make a lot of people's lives easier, and prevent them from writing
> bad hash functions accidentally.
>
>
> Couldn't we do it using GHC's default implementations based on
> signatures features, so we don't have to expose any new things in the
> API?
>
> We used that in unordered-containers like so:
>
> #ifdef GENERICS
>     default parseRecord :: (Generic a, GFromRecord (Rep a)) => Record
> -> Parser a
>     parseRecord r = to <$> gparseRecord r
> #endif
>
> -- Johan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20121104/528b3c9e/attachment.htm>


More information about the Haskell-Cafe mailing list