caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] module and it's types as function parameters
@ 2017-11-23 12:52 Serge Sivkov
  2017-11-23 13:14 ` Nicolás Ojeda Bär
  0 siblings, 1 reply; 3+ messages in thread
From: Serge Sivkov @ 2017-11-23 12:52 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 469 bytes --]

Hello,

is there way to define module with similar interface:

module R = struct
        type topicf = (module F : I) -> F.message -> F.message
        and topic = { func: topicf; name: string }
        ...
end

it is possible in case I want to define function with similar signature I
can declare used types by:
let test (type message') (module M : I with type message = message') (v:
message') : message' = ...

But how should I create such type in module?

WBR, ssp

[-- Attachment #2: Type: text/html, Size: 649 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-24  5:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-23 12:52 [Caml-list] module and it's types as function parameters Serge Sivkov
2017-11-23 13:14 ` Nicolás Ojeda Bär
2017-11-24  5:27   ` Serge Sivkov

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).