> 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.

While void datatypes are rare, it just doesn't make sense to exclude
them. It's an arbitrary restriction. Here's a constructed example:

data X a = C1 Int | C2 a
data Z -- empty

type Example = X Z

We're using Z as a parameter to X in order to exclude the use of the
C2 case. Without a V1 case, you cannot use deepSeq on values of type
Example.

Cheers,
  Andres

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to