Version française
Home     About     Download     Resources     Contact us    
Browse thread
Auto-closing polymorphic variants ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Teller <David.Teller@u...>
Subject: Re: [Caml-list] Auto-closing polymorphic variants ?
Well, sure, but that's a bit unsatisfying, as it's a policy which the
type-checker cannot check.

Cheers,
 David

On Thu, 2008-02-21 at 01:29 +0100, Martin Jambon wrote:
> > Does anyone have ideas on this subject ?
> 
> Yes: don't use wildcards mixed with concrete cases:
> 
> Good: function `A -> ... | `B -> ...
> Good: function _ -> ...
> 
> Bad: function `A -> ... | _ -> ...

-- 
David Teller
 Security of Distributed Systems
  http://www.univ-orleans.fr/lifo/Members/David.Teller
 Angry researcher: French Universities need reforms, but the LRU act
brings liquidations.