Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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 ->
      DEBUG;
      raise Not_found
  | Node(l, k, r, _) ->
    DEBUG;
      let c = compare id.name k.ident.name in
      DEBUG;
      if c = 0 then (DEBUG;
        if id.stamp = k.ident.stamp
        then (DEBUG;k.data)
        else (DEBUG; find_stamp id.stamp k.previous)
      )else(DEBUG;
        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
correct?

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???

Jonathan