From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA18076 for caml-redistribution; Tue, 8 Sep 1998 09:08:37 +0200 (MET DST) 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 RAA04279 for ; Mon, 7 Sep 1998 17:12:47 +0200 (MET DST) Received: from margaux.inria.fr (margaux.inria.fr [128.93.8.2]) by concorde.inria.fr (8.8.7/8.8.7) with ESMTP id RAA12042 for ; Mon, 7 Sep 1998 17:12:46 +0200 (MET DST) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by margaux.inria.fr (8.7.6/8.7.3) with ESMTP id RAA28629 for ; Mon, 7 Sep 1998 17:12:46 +0200 (MET DST) Received: from front1.grolier.fr (front1.grolier.fr [194.158.96.51]) by concorde.inria.fr (8.8.7/8.8.7) with ESMTP id RAA12035 for ; Mon, 7 Sep 1998 17:12:44 +0200 (MET DST) Received: from [194.158.109.186] (ppp-109-186.villette.club-internet.fr [194.158.109.186]) by front1.grolier.fr (8.9.1/MGC-980407-Frontal-No_Relay) with SMTP id RAA29206 for ; Mon, 7 Sep 1998 17:12:42 +0200 (MET DST) Message-Id: <199809071512.RAA29206@front1.grolier.fr> Subject: declaration of an infix operator in a .mli file Date: Mon, 7 Sep 98 17:15:07 +0200 x-sender: lcheno@pop3.club-internet.fr x-mailer: Claris Emailer 2.0Fv1 , 3 juillet 1997 From: Laurent Ch=?ISO-8859-1?Q?éno?= To: "Caml list" Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-transfer-encoding: quoted-printable Sender: weis Sorry : poor-english version at the end of this message. Dans foo.ml, j'ai les définitions suivantes de nouveaux = opérateurs infixes : (***) let epsilon = 1.0e-4 ;; let (prefix =?) = fun x y -> abs_float (x -. y) <. epsilon and (prefix x <. y +. epsilon and (prefix >?) = fun x y -> y <. x +. epsilon ;; (***) Quel fichier foo.mli dois-je écrire pour les exporter ? Et, au fait, pourquoi let (prefix =?) x y = abs_float (x -. y) <. epsilon ;; est-il incorrect ? (J'obtiens une Erreur de syntaxe.) Cordialement, Laurent Chéno ---- I wrote this litte file foo.ml : (***) let epsilon = 1.0e-4 ;; let (prefix =?) = fun x y -> abs_float (x -. y) <. epsilon and (prefix x <. y +. epsilon and (prefix >?) = fun x y -> y <. x +. epsilon ;; (***) I do'nt know write the file foo.mli. Another question : why is the following wrong ? let (prefix =?) x y = abs_float (x -. y) <. epsilon ;; (I obtain a Syntax error)