From: Jeremy Yallop <yallop@gmail.com>
To: Ivan Gotovchits <ivg@ieee.org>
Cc: Francois Pottier <francois.pottier@inria.fr>,
Kenichi Asai <asai@is.ocha.ac.jp>,
caml-list@inria.fr
Subject: Re: [Caml-list] automatically resolving open?
Date: Wed, 23 Apr 2025 15:33:42 +0000 [thread overview]
Message-ID: <CAAxsn=EzXJAWsfx8GyNc9x+Q76m08nk3H1CvBNfmjSgt6R5E0g@mail.gmail.com> (raw)
In-Reply-To: <CALdWJ+xxizBHMz9bz1Qf2K9nb+tQbZj1+DpdU7d6bFRH1iXOsg@mail.gmail.com>
On Wed, 23 Apr 2025 at 14:32, Francois Pottier
<francois.pottier@inria.fr> wrote:
> open List
> module List = struct end
> let test = map (fun x -> x + 1) [1; 2; 3]
On Wed, 23 Apr 2025 at 14:46, Ivan Gotovchits <ivg@ieee.org> wrote:
> open struct let map f x = f x end
> let () = map (fun _ -> ()) 0
We could perhaps add structure-level substitutions to handle these
kinds of cases:
module L := List
module List = struct end
let test = L.map (fun x -> x + 1) [1; 2; 3]
module M := struct let map f x = f x end
let () = M.map (fun _ -> ()) 0
As in signatures, the idea would be that names like 'L' and 'M' bound
in this way would be internal-only, and would not appear in the
signature.
next prev parent reply other threads:[~2025-04-23 15:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 14:10 Kenichi Asai
2025-04-23 14:32 ` Francois Pottier
2025-04-23 14:38 ` BOBOT François
2025-04-23 14:45 ` Ivan Gotovchits
2025-04-23 15:33 ` Jeremy Yallop [this message]
2025-04-24 4:33 ` Oleg
2025-04-24 6:39 ` Virgile Prevosto
2025-04-24 9:16 ` Ulysse Gérard
2025-04-24 13:06 ` Kenichi Asai
2025-04-24 13:44 ` Ulysse Gérard
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='CAAxsn=EzXJAWsfx8GyNc9x+Q76m08nk3H1CvBNfmjSgt6R5E0g@mail.gmail.com' \
--to=yallop@gmail.com \
--cc=asai@is.ocha.ac.jp \
--cc=caml-list@inria.fr \
--cc=francois.pottier@inria.fr \
--cc=ivg@ieee.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