From: "Laurent Chéno" <lcheno@club-internet.fr>
To: "Caml list" <caml-list@margaux.inria.fr>
Subject: declaration of an infix operator in a .mli file
Date: Mon, 7 Sep 98 17:15:07 +0200 [thread overview]
Message-ID: <199809071512.RAA29206@front1.grolier.fr> (raw)
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)
next reply other threads:[~1998-09-08 7:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-09-07 15:15 Laurent Chéno [this message]
1998-09-08 6:42 ` Pierre Weis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199809071512.RAA29206@front1.grolier.fr \
--to=lcheno@club-internet.fr \
--cc=caml-list@margaux.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox