Version française
Home     About     Download     Resources     Contact us    
Browse thread
Dummy polymorphic constructors
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] Dummy polymorphic constructors
On Fri, 2004-12-17 at 12:10, Jacques Garrigue wrote:

> > type empty = [ ]

> Maybe this should be a typing error rather than a syntactic one, to
> make the intention clearer.

> Empty sum types are not allowed, because, while they are not really
> dangerous, they may delay type errors.

How about: make it an error, unless -rectypes is specified.
In that case allow it. (Seems sensible to allow three cases:
(a) error (b) warning (c) no warning .. but I can't think
of how to provide that ..)

-- 
John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net