From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id AAA00726; Wed, 19 Sep 2001 00:48:20 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id AAA01174 for ; Wed, 19 Sep 2001 00:48:16 +0200 (MET DST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f8IMmEr25769 for ; Wed, 19 Sep 2001 00:48:15 +0200 (MET DST) Received: from localhost (patrick@localhost) by fledge.watson.org (8.11.6/8.11.5) with SMTP id f8IMm3s83684 for ; Tue, 18 Sep 2001 18:48:03 -0400 (EDT) (envelope-from patrick@watson.org) Date: Tue, 18 Sep 2001 18:48:02 -0400 (EDT) From: Patrick M Doane To: caml-list@inria.fr Subject: [Caml-list] Polymorphic variant abbreviations Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I have some code that would like to use polymorphic type abbreviations along with labels. It seems to be not behaving quite like I expected. What could I do to make this shorter: type a = [ `A ] let f ~a:(#a as a) = ... I was hoping that I could use this: let f ~a:#a = ... but then it says that 'a' is unbound. I also find that the error messages are not as useful as they could be with the type abbreviations. E.g: This expression has type ... but is here used with #a as 'a = 'a Would it be hard to expand '#a' like this so I don't have to track down the definition? This expression has type ... but is here used with #a = [ `A ] Thanks for any help or suggestions, Patrick ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr