Strange error in show for datatype
Dylan Thurston
dpt@math.harvard.edu
Thu, 4 Oct 2001 17:52:50 +0900
On Thu, Oct 04, 2001 at 12:36:55AM -0700, Simon Peyton-Jones wrote:
> So in fact, all we need do is:
> for each class, find the variance of each of its parameters
> in an ambiguous type, zap any positive parameters to Empty
>
> That sounds pretty easy. We don't need Haskell 2 for that. I feel
> a little implementation coming on.
This is, nevertheless, an extension to the language, right? Or is the
class system poorly enough specified that it's unclear?
> Void was a type with one element. What we really want here is
> a type with no elements. It's also useful to be able to introduce
> such empty types for phantom-type purposes, so GHC now lets you say
>
> data T
>
> and get a type T with no values.
Ah, excellent! I've frequently wanted to do this.
Best,
Dylan Thurston