From: Pierre CASTERAN <Pierre.Casteran@labri.u-bordeaux.fr>
To: caml-list@inria.fr
Subject: local opening
Date: Tue, 24 Feb 1998 09:50:01 +0100 (MET) [thread overview]
Message-ID: <199802240850.JAA01161@scrasmeustache.labri.u-bordeaux.fr> (raw)
Hello,
Is it possible to open a module inside a single expression ?
I tried :
module Compl=
struct
type compl=float*float
let compl(r:float)=(r,0.0)
let i=(0.0,1.0)
let add(((a,b):compl),((a',b'):compl))=
(a+.a',b+.b')
let mult(((a,b):compl),((a',b'):compl))=
(a*.a'-.b*.b',a*.b'+.b*.a')
end;;
let open Compl
in mult(i,i);;
but it produced a syntax error .
Is it possible to avoid an heavy :
Compl.mult(Compl.i,Compl.i);;
or a (global) opening of Compl ?
Best regards,
Pierre
reply other threads:[~1998-02-24 15:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=199802240850.JAA01161@scrasmeustache.labri.u-bordeaux.fr \
--to=pierre.casteran@labri.u-bordeaux.fr \
--cc=caml-list@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