
On 15/07/15 18:56, Ömer Sinan Ağacan wrote:
Haskell 2010 doesn't support data types without any constructors(aka. empty data type)[1].
Haskell 2010 does support data types without constructors: https://www.haskell.org/onlinereport/haskell2010/haskellch4.html#x10-690004....
1. What do you think is the right way to derive instances for empty data types? An `error` or pattern match on bottom argument(e.g. empty case)?
The right question is whether the methods should be strict in the arguments of empty types. The strict version can be implemented with an empty case (which is stylistically nicer), or with error + seq/bang patterns; it doesn't matter. I agree that the derived methods should be strict.
2. Do you think with EmptyDataDecls and StandaloneDeriving, `deriving(..)` and standalone deriving should derive same instances?
Certainly.
3. Should we change instances of Void on the way, for consistency? (Ord and Eq especially)
Yes.