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-23 (00:54)
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.

I have found the culprit function, in ident.ml:

let rec find_same id = function
    Empty ->
      raise Not_found
  | Node(l, k, r, _) ->
      let c = compare id.name k.ident.name in
      if c = 0 then (DEBUG;
        if id.stamp = k.ident.stamp
        then (DEBUG;k.data)
        else (DEBUG; find_stamp id.stamp k.previous)
        find_same id (if c < 0 then l else r))

"let c = compare id.name k.ident.name in" gets stuck in an infinite
loop, so it seems we have a structure with a loop in it... is that

I can't think what else would cause it to not reach the DEBUG
statement after it.

Now begs the question: what the hell is going on? First no symbols
defined automatically from Pervasives, now Ident module is broken???