caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Can we implement #load to load dependencies automatically?
@ 2016-04-29  4:57 Junsong Li
  2016-04-29 10:28 ` Jeremie Dimino
  0 siblings, 1 reply; 4+ messages in thread
From: Junsong Li @ 2016-04-29  4:57 UTC (permalink / raw)
  To: caml users

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

Hi list,

I am wondering why we can't make #load to load everything needed
automatically, given object files already in the search path.

FYI, currently, it only shows the error (t opens B and uses B.x)

utop # #load "t.cmo";;
Error: Reference to undefined global `B'

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

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

* Re: [Caml-list] Can we implement #load to load dependencies automatically?
  2016-04-29  4:57 [Caml-list] Can we implement #load to load dependencies automatically? Junsong Li
@ 2016-04-29 10:28 ` Jeremie Dimino
  2016-04-29 10:54   ` Gabriel Scherer
  0 siblings, 1 reply; 4+ messages in thread
From: Jeremie Dimino @ 2016-04-29 10:28 UTC (permalink / raw)
  To: Junsong Li; +Cc: caml users

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

If all dependencies are in the search path, you should be able to use
`#load_rec`, which does exactly this

On Fri, Apr 29, 2016 at 5:57 AM, Junsong Li <ljs.darkfish@gmail.com> wrote:

> Hi list,
>
> I am wondering why we can't make #load to load everything needed
> automatically, given object files already in the search path.
>
> FYI, currently, it only shows the error (t opens B and uses B.x)
>
> utop # #load "t.cmo";;
> Error: Reference to undefined global `B'
>



-- 
Jeremie

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

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

* Re: [Caml-list] Can we implement #load to load dependencies automatically?
  2016-04-29 10:28 ` Jeremie Dimino
@ 2016-04-29 10:54   ` Gabriel Scherer
  2016-04-30  1:54     ` Junsong Li
  0 siblings, 1 reply; 4+ messages in thread
From: Gabriel Scherer @ 2016-04-29 10:54 UTC (permalink / raw)
  To: Jeremie Dimino; +Cc: Junsong Li, caml users

Note that since 4.03, the OCaml toplevel comes with a "#help"
directive that makes it easy to discover the available directives
and their meaning.

Utop, even on earlier OCaml versions, additionally provides an
#utop_help command that describes utop-specific features (key
bindings, macros).

On Fri, Apr 29, 2016 at 6:28 AM, Jeremie Dimino <jdimino@janestreet.com> wrote:
> If all dependencies are in the search path, you should be able to use
> `#load_rec`, which does exactly this
>
> On Fri, Apr 29, 2016 at 5:57 AM, Junsong Li <ljs.darkfish@gmail.com> wrote:
>>
>> Hi list,
>>
>> I am wondering why we can't make #load to load everything needed
>> automatically, given object files already in the search path.
>>
>> FYI, currently, it only shows the error (t opens B and uses B.x)
>>
>> utop # #load "t.cmo";;
>> Error: Reference to undefined global `B'
>
>
>
>
> --
> Jeremie

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

* Re: [Caml-list] Can we implement #load to load dependencies automatically?
  2016-04-29 10:54   ` Gabriel Scherer
@ 2016-04-30  1:54     ` Junsong Li
  0 siblings, 0 replies; 4+ messages in thread
From: Junsong Li @ 2016-04-30  1:54 UTC (permalink / raw)
  To: Gabriel Scherer; +Cc: Jeremie Dimino, caml users

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

Oops, I need to read the manual more carefully. #load_rec works.

Thanks!

On Fri, Apr 29, 2016 at 3:54 AM, Gabriel Scherer <gabriel.scherer@gmail.com>
wrote:

> Note that since 4.03, the OCaml toplevel comes with a "#help"
> directive that makes it easy to discover the available directives
> and their meaning.
>
> Utop, even on earlier OCaml versions, additionally provides an
> #utop_help command that describes utop-specific features (key
> bindings, macros).
>
> On Fri, Apr 29, 2016 at 6:28 AM, Jeremie Dimino <jdimino@janestreet.com>
> wrote:
> > If all dependencies are in the search path, you should be able to use
> > `#load_rec`, which does exactly this
> >
> > On Fri, Apr 29, 2016 at 5:57 AM, Junsong Li <ljs.darkfish@gmail.com>
> wrote:
> >>
> >> Hi list,
> >>
> >> I am wondering why we can't make #load to load everything needed
> >> automatically, given object files already in the search path.
> >>
> >> FYI, currently, it only shows the error (t opens B and uses B.x)
> >>
> >> utop # #load "t.cmo";;
> >> Error: Reference to undefined global `B'
> >
> >
> >
> >
> > --
> > Jeremie
>

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

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

end of thread, other threads:[~2016-04-30  1:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-29  4:57 [Caml-list] Can we implement #load to load dependencies automatically? Junsong Li
2016-04-29 10:28 ` Jeremie Dimino
2016-04-29 10:54   ` Gabriel Scherer
2016-04-30  1:54     ` Junsong Li

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