[Haskell-cafe] ANN: generic-deepseq

Maxime Henrion mhenrion at gmail.com
Sat Feb 25 01:39:23 CET 2012

On Fri, 2012-02-24 at 15:28 +0100, Andres Löh wrote:
> Hi.
> >> I don't understand what's going on here. Instances for V1 should of
> >> course be defined if they can be! And in this case, a V1 instance
> >> makes sense and should be defined. The definition itself doesn't
> >> matter, as it'll never be executed.
> >
> >
> > The definition certainly matters:
> [...]
> You're right. I was too quick to conclude the definition doesn't
> matter. But it should still be there. V1 can occur in representations
> of non-empty types (even if the current mechanism might not generate
> them). You'd still want to be able to call generic functions on such
> types.

Would you have an example of a type for which it would be useful to have
a DeepSeq instance, and that would require a V1 instance? I cannot think
of one now; I originaly thought it would be necessary to permit deriving
DeepSeq instances for types tagged with "void" types, but as José
explained, in that case, the V1 instance isn't needed because those void
types don't show up in the representation.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120225/0af5f73f/attachment.pgp>

More information about the Haskell-Cafe mailing list