caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Creating an lwt toplevel
@ 2009-10-06 14:48 Alan Schmitt
  2009-10-06 14:56 ` [Caml-list] " RABIH.EL-CHAAR
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Alan Schmitt @ 2009-10-06 14:48 UTC (permalink / raw)
  To: caml-list

Hello,

I am trying to experiment with some code that uses lwt, and I would
like to do it in a toplevel. Unfortunately I seem to be missing a
step. Here is what I tried:

# #load "unix.cma";;
# #load "/Users/schmitta/godi/lib/ocaml/pkg-lib/lwt/lwt.cma";;
# open Lwt;;
Error: Unbound module Lwt

I then tried:

$ ocamlfind ocamlmktop -o lwtcaml -package lwt unix.cma lwt.cma
$ ./lwtcaml
        Objective Caml version 3.11.1

# open Lwt;;
Error: Unbound module Lwt

I feel like I'm missing something obvious, but cannot see what it is right now.

Thanks for any suggestion,

Alan


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

* RE: [Caml-list] Creating an lwt toplevel
  2009-10-06 14:48 Creating an lwt toplevel Alan Schmitt
@ 2009-10-06 14:56 ` RABIH.EL-CHAAR
  2009-10-06 15:01 ` Chantal KELLER
  2009-10-06 15:26 ` Jérémie Dimino
  2 siblings, 0 replies; 6+ messages in thread
From: RABIH.EL-CHAAR @ 2009-10-06 14:56 UTC (permalink / raw)
  To: caml-list-bounces, caml-list

You are probably missing the .cmi files.
The .cma contains the bytecode, but not module signatures.

The toplevel has to see the corresponding .cmi files (#directory might help from the toplevel).

Rabih

-----Message d'origine-----
De : caml-list-bounces@yquem.inria.fr [mailto:caml-list-bounces@yquem.inria.fr] 
Envoyé : mardi 6 octobre 2009 16:48
À : caml-list@inria.fr
Objet : [Caml-list] Creating an lwt toplevel


Hello,

I am trying to experiment with some code that uses lwt, and I would
like to do it in a toplevel. Unfortunately I seem to be missing a
step. Here is what I tried:

# #load "unix.cma";;
# #load "/Users/schmitta/godi/lib/ocaml/pkg-lib/lwt/lwt.cma";;
# open Lwt;;
Error: Unbound module Lwt

I then tried:

$ ocamlfind ocamlmktop -o lwtcaml -package lwt unix.cma lwt.cma
$ ./lwtcaml
        Objective Caml version 3.11.1

# open Lwt;;
Error: Unbound module Lwt

I feel like I'm missing something obvious, but cannot see what it is right
now.

Thanks for any suggestion,

Alan

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

*************************************************************************
This message and any attachments (the "message") are confidential, intended solely for the addressee(s), and may contain legally privileged information.
Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration.   
Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or
falsified.
                              ************
Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et susceptibles de contenir des informations couvertes 
par le secret professionnel. 
Ce message est etabli a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite.
Tout message electronique est susceptible d'alteration. 
La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie.
*************************************************************************


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

* Re: [Caml-list] Creating an lwt toplevel
  2009-10-06 14:48 Creating an lwt toplevel Alan Schmitt
  2009-10-06 14:56 ` [Caml-list] " RABIH.EL-CHAAR
@ 2009-10-06 15:01 ` Chantal KELLER
  2009-10-06 15:13   ` Alan Schmitt
  2009-10-06 15:26 ` Jérémie Dimino
  2 siblings, 1 reply; 6+ messages in thread
From: Chantal KELLER @ 2009-10-06 15:01 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: caml-list

Hello,


Alan Schmitt a écrit :
> $ ocamlfind ocamlmktop -o lwtcaml -package lwt unix.cma lwt.cma
> $ ./lwtcaml
>         Objective Caml version 3.11.1
> 
> # open Lwt;;
> Error: Unbound module Lwt

I think the problem is that the place where lwt.cma is is not in the
path of ./lwtcaml, even if you said so with ocamlmktop.

I got the same problem a few days ago, there is a thread on the
ocaml_beginners mailing list
<http://tech.groups.yahoo.com/group/ocaml_beginners/message/11426>. I do
not know how to translate it using ocamlfind.
-- 
Chantal KELLER


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

* Re: [Caml-list] Creating an lwt toplevel
  2009-10-06 15:01 ` Chantal KELLER
@ 2009-10-06 15:13   ` Alan Schmitt
  0 siblings, 0 replies; 6+ messages in thread
From: Alan Schmitt @ 2009-10-06 15:13 UTC (permalink / raw)
  To: caml-list

Thanks to both of you, the trick was specifying the directory.

Alan


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

* Re: [Caml-list] Creating an lwt toplevel
  2009-10-06 14:48 Creating an lwt toplevel Alan Schmitt
  2009-10-06 14:56 ` [Caml-list] " RABIH.EL-CHAAR
  2009-10-06 15:01 ` Chantal KELLER
@ 2009-10-06 15:26 ` Jérémie Dimino
  2009-10-07  8:25   ` Alan Schmitt
  2 siblings, 1 reply; 6+ messages in thread
From: Jérémie Dimino @ 2009-10-06 15:26 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: caml-list

Hello,

Le mardi 06 octobre 2009 à 16:48 +0200, Alan Schmitt a écrit :
> I am trying to experiment with some code that uses lwt, and I would
> like to do it in a toplevel. Unfortunately I seem to be missing a
> step. Here is what I tried:
> 
> # #load "unix.cma";;
> # #load "/Users/schmitta/godi/lib/ocaml/pkg-lib/lwt/lwt.cma";;

The easiest way is to use findlib:

# #use "topfind";;
# #require "lwt";;

-- 
Jérémie


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

* Re: [Caml-list] Creating an lwt toplevel
  2009-10-06 15:26 ` Jérémie Dimino
@ 2009-10-07  8:25   ` Alan Schmitt
  0 siblings, 0 replies; 6+ messages in thread
From: Alan Schmitt @ 2009-10-07  8:25 UTC (permalink / raw)
  To: caml-list

On Tue, Oct 6, 2009 at 5:26 PM, Jérémie Dimino <jeremie@dimino.org> wrote:
>
> The easiest way is to use findlib:
>
> # #use "topfind";;
> # #require "lwt";;

This is very useful. Thanks for the tip.

Alan


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

end of thread, other threads:[~2009-10-07  8:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-06 14:48 Creating an lwt toplevel Alan Schmitt
2009-10-06 14:56 ` [Caml-list] " RABIH.EL-CHAAR
2009-10-06 15:01 ` Chantal KELLER
2009-10-06 15:13   ` Alan Schmitt
2009-10-06 15:26 ` Jérémie Dimino
2009-10-07  8:25   ` Alan Schmitt

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