* [Caml-list] recursive module definition
@ 2017-11-29 13:19 Serge Sivkov
0 siblings, 0 replies; only message in thread
From: Serge Sivkov @ 2017-11-29 13:19 UTC (permalink / raw)
To: OCaml Mailing List
[-- 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 --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-11-29 13:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-29 13:19 [Caml-list] recursive module definition Serge Sivkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox