From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA31142 for caml-redistribution; Thu, 18 Mar 1999 10:38:30 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id HAA30903 for ; Thu, 18 Mar 1999 07:35:43 +0100 (MET) Received: from hadar.cse.Buffalo.EDU (hadar.cse.Buffalo.EDU [128.205.32.1]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id HAA15918 for ; Thu, 18 Mar 1999 07:35:40 +0100 (MET) Received: (from whitley@localhost) by hadar.cse.Buffalo.EDU (8.8.8/8.8.5) id BAA28667; Thu, 18 Mar 1999 01:35:40 -0500 (EST) From: John Whitley MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 18 Mar 1999 01:35:40 -0500 (EST) To: caml-list@inria.fr Subject: OLabl optional arguments and higher order functions X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid Message-ID: <14064.39685.480989.489383@hadar.cse.Buffalo.EDU> Sender: weis Consider the following example, from OLabl 2.02: # let ack ?:x [< 0 >] :y = x * y;; val ack : ?x:int -> y:int -> int = # let hack funarg = funarg x:4 y:5;; val hack : (x:int -> y:int -> 'a) -> 'a = # hack ack;; Characters 5-8: This expression has type ?x:int -> y:int -> int but is here used with type x:int -> y:int -> 'a This seems like a bug. Intuitively, labels x: and ?x: should unify. If not, I would appreciate a brief explanation as to why not... Forcibly replacing the optional argument with the same label via fun works just fine: # hack (fun :x -> ack :x);; - : int = 20 Thanks for any insights, John