caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* declaration of an infix operator in a .mli file
@ 1998-09-07 15:15 Laurent Chéno
  1998-09-08  6:42 ` Pierre Weis
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent Chéno @ 1998-09-07 15:15 UTC (permalink / raw)
  To: Caml list

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 <?) = fun x y -> 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 <?) = fun x y -> 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)





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1998-09-08  7:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-09-07 15:15 declaration of an infix operator in a .mli file Laurent Chéno
1998-09-08  6:42 ` Pierre Weis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).