Re: Strange error in show for datatype
Thu, 4 Oct 2001 00:36:55 -0700, Simon Peyton-Jones
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.
I think both Void and T have bottom, and both have no other values. -- __("< Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/ \__/ ^^ SYGNATURA ZASTÊPCZA QRCZAK
On Thu, Oct 04, 2001 at 09:23:10AM +0000, Marcin 'Qrczak' Kowalczyk wrote:
Thu, 4 Oct 2001 00:36:55 -0700, Simon Peyton-Jones
pisze: 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.
I think both Void and T have bottom, and both have no other values.
So this extension adds something we already have in Haskell 98, with either newtype Void = Void Void or data Void = Void !Void (as I think Patrik Jansson pointed out)
participants (2)
-
Marcin 'Qrczak' Kowalczyk -
Ross Paterson