caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] ocamldoc doesn't show up for the Unix module in ocp-browser
@ 2017-06-13  6:16 Francois BERENGER
  2017-06-13  9:01 ` [Caml-list] Why is there no Marshal.(from_fd|to_fd) Francois BERENGER
  2017-06-14 11:32 ` [Caml-list] ocamldoc doesn't show up for the Unix module in ocp-browser louis.gesbert
  0 siblings, 2 replies; 7+ messages in thread
From: Francois BERENGER @ 2017-06-13  6:16 UTC (permalink / raw)
  To: caml-list

Hello,

Is this an installation problem with the stdlib?

Apparently, the ocamldoc is missing for the Unix module.
While it's there for other modules I tried (List and Array for example).

I'm using ocaml-4.01.0 via opam.

Usually, in ocp-browser, hitting the space bar shows the ocamldoc
for the given entry.

Am I the only one seeing this?

Regards,
F.

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

* [Caml-list] Why is there no Marshal.(from_fd|to_fd)
  2017-06-13  6:16 [Caml-list] ocamldoc doesn't show up for the Unix module in ocp-browser Francois BERENGER
@ 2017-06-13  9:01 ` Francois BERENGER
  2017-06-13  9:22   ` Ivan Gotovchits
  2017-06-14 11:32 ` [Caml-list] ocamldoc doesn't show up for the Unix module in ocp-browser louis.gesbert
  1 sibling, 1 reply; 7+ messages in thread
From: Francois BERENGER @ 2017-06-13  9:01 UTC (permalink / raw)
  To: caml-list

Hello,

Sorry for the maybe stupid question.

I mean fd has type Unix.file_descr.

I am just wondering why marshaling has to always go through an in or 
out_channel.

Is it just so that there is not dependency between the Marshal and the 
Unix module?

I am worried about the data copying that might happen because
of the channel interposed between me and my file.

Regards,
F.

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

* Re: [Caml-list] Why is there no Marshal.(from_fd|to_fd)
  2017-06-13  9:01 ` [Caml-list] Why is there no Marshal.(from_fd|to_fd) Francois BERENGER
@ 2017-06-13  9:22   ` Ivan Gotovchits
  0 siblings, 0 replies; 7+ messages in thread
From: Ivan Gotovchits @ 2017-06-13  9:22 UTC (permalink / raw)
  To: Francois BERENGER; +Cc: caml-list

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

Hi,

The main reason is that marshaling is a part of standard library, i.e., the
stdlib.cma, where Unix.file_descr is a part of the unix library, and the
Unix library is not included into the Standard library, thus the latter
cannot depend on the former. So, the only way to introduce such
functionality would be to add Unix.dump_value : file_descr -> 'a -> unit`,
i.e., to the Unix module. It is doable, and I saw such function in
third-party libraries and implemented it myself. There is a small issue
with the buffering, as all file_descr operations are unbuffered and it is
assumed that the do not create any intermediate storages. But the only way
to implement the dump_value function is to use an intermediate buffer, that
kind of contradicts the general spirit of the file_descr interface.

Regards,
Ivan Gotovchits

On Tue, Jun 13, 2017 at 11:01 AM, Francois BERENGER <
berenger@bioreg.kyushu-u.ac.jp> wrote:

> Hello,
>
> Sorry for the maybe stupid question.
>
> I mean fd has type Unix.file_descr.
>
> I am just wondering why marshaling has to always go through an in or
> out_channel.
>
> Is it just so that there is not dependency between the Marshal and the
> Unix module?
>
> I am worried about the data copying that might happen because
> of the channel interposed between me and my file.
>
> Regards,
> F.
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>

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

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

* Re: [Caml-list] ocamldoc doesn't show up for the Unix module in ocp-browser
  2017-06-13  6:16 [Caml-list] ocamldoc doesn't show up for the Unix module in ocp-browser Francois BERENGER
  2017-06-13  9:01 ` [Caml-list] Why is there no Marshal.(from_fd|to_fd) Francois BERENGER
@ 2017-06-14 11:32 ` louis.gesbert
  2017-06-14 13:13   ` Daniel Bünzli
  1 sibling, 1 reply; 7+ messages in thread
From: louis.gesbert @ 2017-06-14 11:32 UTC (permalink / raw)
  To: caml-list

Apparently, the `.cmt` for Unix don't get installed as for the other modules 
of the stdlib. ocp-index/ocp-browser extracts the docstrings directly from 
there, which explains the results.

On mardi 13 juin 2017 15:16:14 CEST Francois BERENGER wrote:
> Hello,
> 
> Is this an installation problem with the stdlib?
> 
> Apparently, the ocamldoc is missing for the Unix module.
> While it's there for other modules I tried (List and Array for example).
> 
> I'm using ocaml-4.01.0 via opam.
> 
> Usually, in ocp-browser, hitting the space bar shows the ocamldoc
> for the given entry.
> 
> Am I the only one seeing this?
> 
> Regards,
> F.


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

* Re: [Caml-list] ocamldoc doesn't show up for the Unix module in ocp-browser
  2017-06-14 11:32 ` [Caml-list] ocamldoc doesn't show up for the Unix module in ocp-browser louis.gesbert
@ 2017-06-14 13:13   ` Daniel Bünzli
  2017-06-14 23:47     ` Francois BERENGER
  2017-06-15 15:15     ` Louis Gesbert
  0 siblings, 2 replies; 7+ messages in thread
From: Daniel Bünzli @ 2017-06-14 13:13 UTC (permalink / raw)
  To: louis.gesbert, caml-list

On 14 June 2017 at 12:34:32, louis.gesbert@ocamlpro.com (louis.gesbert@ocamlpro.com) wrote:

> Apparently, the `.cmt` for Unix don't get installed as for the other modules
> of the stdlib. ocp-index/ocp-browser extracts the docstrings directly from
> there, which explains the results.

If it also looks up cmti files. This should have been solved from 4.04 on. See 

https://caml.inria.fr/mantis/view.php?id=7362

Best,

Daniel

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

* Re: [Caml-list] ocamldoc doesn't show up for the Unix module in ocp-browser
  2017-06-14 13:13   ` Daniel Bünzli
@ 2017-06-14 23:47     ` Francois BERENGER
  2017-06-15 15:15     ` Louis Gesbert
  1 sibling, 0 replies; 7+ messages in thread
From: Francois BERENGER @ 2017-06-14 23:47 UTC (permalink / raw)
  To: caml-list

On 06/14/2017 10:13 PM, Daniel Bünzli wrote:
> On 14 June 2017 at 12:34:32, louis.gesbert@ocamlpro.com (louis.gesbert@ocamlpro.com) wrote:
> 
>> Apparently, the `.cmt` for Unix don't get installed as for the other modules
>> of the stdlib. ocp-index/ocp-browser extracts the docstrings directly from
>> there, which explains the results.
> 
> If it also looks up cmti files. This should have been solved from 4.04 on. See
> 
> https://caml.inria.fr/mantis/view.php?id=7362

Ok, there are no .cmt/.cmti files installed for the unix module.

I opened a bug in mantis:
https://caml.inria.fr/mantis/view.php?id=7556

Thanks for the feedback Louis and Daniel.

Regards,
F.

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

* Re: [Caml-list] ocamldoc doesn't show up for the Unix module in ocp-browser
  2017-06-14 13:13   ` Daniel Bünzli
  2017-06-14 23:47     ` Francois BERENGER
@ 2017-06-15 15:15     ` Louis Gesbert
  1 sibling, 0 replies; 7+ messages in thread
From: Louis Gesbert @ 2017-06-15 15:15 UTC (permalink / raw)
  To: caml-list, Daniel Bünzli

Yes, the cmti should be sufficient.

> - Daniel Bünzli, 14/06/2017 14:13 -
> On 14 June 2017 at 12:34:32, louis.gesbert@ocamlpro.com (louis.gesbert@ocamlpro.com) wrote:
> 
> > Apparently, the `.cmt` for Unix don't get installed as for the other modules
> > of the stdlib. ocp-index/ocp-browser extracts the docstrings directly from
> > there, which explains the results.
> 
> If it also looks up cmti files. This should have been solved from 4.04 on. See 
> 
> https://caml.inria.fr/mantis/view.php?id=7362
> 
> Best,
> 
> Daniel
> 
> 

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

end of thread, other threads:[~2017-06-15 15:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-13  6:16 [Caml-list] ocamldoc doesn't show up for the Unix module in ocp-browser Francois BERENGER
2017-06-13  9:01 ` [Caml-list] Why is there no Marshal.(from_fd|to_fd) Francois BERENGER
2017-06-13  9:22   ` Ivan Gotovchits
2017-06-14 11:32 ` [Caml-list] ocamldoc doesn't show up for the Unix module in ocp-browser louis.gesbert
2017-06-14 13:13   ` Daniel Bünzli
2017-06-14 23:47     ` Francois BERENGER
2017-06-15 15:15     ` Louis Gesbert

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