caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Alain Frisch <alain@frisch.fr>
To: Jake Donham <jake@donham.org>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] linking the same module more than once
Date: Fri, 08 Aug 2008 08:13:12 +0200	[thread overview]
Message-ID: <489BE3F8.7070207@frisch.fr> (raw)
In-Reply-To: <c7e4e9f0808071623r61cad81cya5fd55f57352a720@mail.gmail.com>

Jake Donham wrote:
> There is no trouble linking a module more than once, but different
> parts of the code can wind up linked to different instances of the
> module, leading to the confusing behavior that exception handling
> seems not to work (and generally that things you think are equal are
> not).

You should really avoid linking two modules with the same name. This can 
lead to all kind of errors and the compiler will not always catch you if 
they have the same signature. You can even break type safety by linking 
two modules with the same name and signature but with different 
implementations:

- without Dynlink: http://caml.inria.fr/mantis/view.php?id=4231
(quite simple with ocaml; more difficult with ocamlopt, but still 
possible with -pack)

- with Dynlink: http://caml.inria.fr/mantis/view.php?id=4229



-- Alain


  parent reply	other threads:[~2008-08-08  6:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-07 23:23 Jake Donham
2008-08-08  0:13 ` [Caml-list] " Stéphane Glondu
2008-08-08  6:13 ` Alain Frisch [this message]
2008-08-08 16:28   ` Jake Donham

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=489BE3F8.7070207@frisch.fr \
    --to=alain@frisch.fr \
    --cc=caml-list@yquem.inria.fr \
    --cc=jake@donham.org \
    /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;
as well as URLs for NNTP newsgroup(s).