Besides the point or not, here is a much simpler version
of
Marc's program which also segfaults (ocamlc 3.09.1),
and
probably due to the same reason:
---
module type Aut =
sig
type t
val f : t -> t
end
module Map(A : Aut) =
struct
type t = A.t list
let f = List.map A.f (* => Segmentation
fault *)
(* let f x = List.map A.f x *) (* => Stack
overflow (correct) *)
end
module rec M : (Aut with type t = int) =
struct
type t
let f x =
match MapM.f [x] with
| [y] -> y
| _ -> assert false
end
and MapM : (Aut with type t = M.t list) =
Map(M)
open M;;
M.f 0
---
Sebastian