Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Ocaml crash
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] Ocaml crash
> I have a class mirror and a type mirror in the same module. This compiles
> without emitting an error. But when I run the toplevel built with this module
> and type:
> 
> let m1 = new mirror ...;;
> 
> the toplevel crashes

This is a known bug (PR#478 in our bug database :-).  It is fixed in
the working sources, and also in 3.03 alpha.

> Besides this I have a question concerning modules. Is it possible to spread
> the implementation of a module over several files and if how is it done?   

You can implement several modules A1, A2, ..., possibly each in its own
file, then re-export the relevant parts in the "main" module A, e.g.

A.ml:
        include A1                      (* re-export everything from A1 *)
        include (A2 : sig ... end)      (* selective re-export from A2 *)
        ...

- Xavier Leroy
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr