caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Sebastian Egner <sebastian.egner@philips.com>
To: caml-list@inria.fr
Cc: "Jonathan Roewen" <jonathan.roewen@gmail.com>
Subject: Re: [Caml-list] Bug in ocamlc or in ocamlrun.
Date: Wed, 19 Apr 2006 12:55:52 +0200	[thread overview]
Message-ID: <OF671330E2.515A2681-ONC1257155.003B58FB-C1257155.003C243C@philips.com> (raw)
In-Reply-To: <ad8cfe7e0604190244v369adb80q6ec0ecc838d87dfe@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 640 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1791 bytes --]

  reply	other threads:[~2006-04-19 10:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-18 23:16 Marc Lasson
2006-04-18 22:29 ` [Caml-list] " Jonathan Roewen
2006-04-19  8:45 ` Keiko Nakata
2006-04-19 19:38   ` Marc Lasson
2006-04-19 18:57     ` Remi Vanicat
2006-04-19  9:33 ` Sebastian Egner
2006-04-19  9:44   ` Jonathan Roewen
2006-04-19 10:55     ` Sebastian Egner [this message]
2006-04-19 20:24       ` Alain Frisch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OF671330E2.515A2681-ONC1257155.003B58FB-C1257155.003C243C@philips.com \
    --to=sebastian.egner@philips.com \
    --cc=caml-list@inria.fr \
    --cc=jonathan.roewen@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).