caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Sebastian Egner <sebastian.egner@philips.com>
To: Marc Lasson <titmarc@free.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Bug in ocamlc or in ocamlrun.
Date: Wed, 19 Apr 2006 11:33:58 +0200	[thread overview]
Message-ID: <OF09CA5267.CE8F525A-ONC1257155.003445E7-C1257155.0034A4E1@philips.com> (raw)
In-Reply-To: <4445734B.6030004@free.fr>

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

> When i compile the following program with ocamlc i get a segmentation 
fault. 
> [...]
> If i replace the function LL.add by
> 
>  let rec add a b = match a, b with
>      [], [] -> []
>    | x::a', y::b' -> (R.add x y)::(add a' b')
>    | _ -> failwith "add"
> 
> the segmentation fault magically disappear.

It seems that it is sufficient to define

        let add a b = List.map2 R.add a b

instead of

        let add = List.map2 R.add

to make the segmentation fault disappear (Ocaml 3.09.1).

Sebastian.

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

  parent reply	other threads:[~2006-04-19  9:36 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 [this message]
2006-04-19  9:44   ` Jonathan Roewen
2006-04-19 10:55     ` Sebastian Egner
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=OF09CA5267.CE8F525A-ONC1257155.003445E7-C1257155.0034A4E1@philips.com \
    --to=sebastian.egner@philips.com \
    --cc=caml-list@inria.fr \
    --cc=titmarc@free.fr \
    /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).