From: Serge Sivkov <ssp.mryau@gmail.com>
To: OCaml Mailing List <caml-list@inria.fr>
Subject: [Caml-list] recursive module definition
Date: Wed, 29 Nov 2017 18:19:45 +0500 [thread overview]
Message-ID: <CAOUGqWyoqzAAQ3xt_QzKzKYXHBtR46_S-VgYTvAR8LFJy83feA@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 396 bytes --]
Hello,
I have yet another question:
what idea stays belong the fact that code works (OCaml 4.04)
module M = struct
let f v = v+1
module MM = struct
let ff (module R: I) v = R.f v
end
let t v = MM.ff (module M: I) 0
end;;
and that code does not compile
module T = struct
let f ff = ff (module T: I) 0
end;;
?
I understand why second script is wrong but why the first script works?
WBR, ssp
[-- Attachment #2: Type: text/html, Size: 698 bytes --]
reply other threads:[~2017-11-29 13:19 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=CAOUGqWyoqzAAQ3xt_QzKzKYXHBtR46_S-VgYTvAR8LFJy83feA@mail.gmail.com \
--to=ssp.mryau@gmail.com \
--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