English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] toplevellib.cma broken?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-12-22 (21:46)
From: Jonathan Roewen <jonathan.roewen@g...>
Subject: Re: [Caml-list] toplevellib.cma broken?
> But I have one really weird problem: all the symbols in Pervasives
> aren't defined.
> Also: it seems to choke on strings, and invoking functions.
> For example: "Base_io.print_int 45;;" gets printed, but then it locks up.

Ahh, I'm making progress on the debugging front.

Around line 237 in toploop.ml:

let execute_phrase ... =
  match res with
  | Result v ->
    if print_outcome then
    | [Tstr_eval exp] ->
      let outv = outval_of_value newenv v exp.exp_type in

The outval_of_value is apparently getting stuck in an infinite loop.
I've yet to disseminate Genprintval module... but any clues while I'm
searching would be helpful =)

This happens on entering: `"bob";;' and `Base_io.print_int 45;;' at the prompt.

(And yes, the floating point is my lack of an implementation of strtod).

BTW: Base_io is my replacement of Pervasives IO functions.