From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 963B47FA4D for ; Wed, 30 Jul 2014 17:28:08 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of christoph.hoeger@tu-berlin.de) identity=pra; client-ip=130.149.7.33; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="christoph.hoeger@tu-berlin.de"; x-sender="christoph.hoeger@tu-berlin.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of christoph.hoeger@tu-berlin.de) identity=mailfrom; client-ip=130.149.7.33; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="christoph.hoeger@tu-berlin.de"; x-sender="christoph.hoeger@tu-berlin.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail.tu-berlin.de) identity=helo; client-ip=130.149.7.33; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="christoph.hoeger@tu-berlin.de"; x-sender="postmaster@mail.tu-berlin.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqoDAKQN2VOClQchm2dsb2JhbABag2BXAYJ3yBWHSwGBDxYQAQEBAQEICQsJFCmEBAEEASMECwFFBgsLGgIFFgsCAgkDAgECAUUTBgIBAYg2CA2oYpdrF4EsjBCCFxaCY4FRBY5ljlGFR4cYiW1qAQ X-IPAS-Result: AqoDAKQN2VOClQchm2dsb2JhbABag2BXAYJ3yBWHSwGBDxYQAQEBAQEICQsJFCmEBAEEASMECwFFBgsLGgIFFgsCAgkDAgECAUUTBgIBAYg2CA2oYpdrF4EsjBCCFxaCY4FRBY5ljlGFR4cYiW1qAQ X-IronPort-AV: E=Sophos;i="5.01,764,1400018400"; d="scan'208";a="87634534" Received: from mail.tu-berlin.de ([130.149.7.33]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 30 Jul 2014 17:28:08 +0200 X-tubIT-Incoming-IP: 130.149.172.228 Received: from brego.uebb.tu-berlin.de ([130.149.172.228]) by mail.tu-berlin.de (exim-4.72/mailfrontend-6) with esmtpa for id 1XCVnR-0002XY-6M; Wed, 30 Jul 2014 17:28:07 +0200 Message-ID: <53D90F05.3070109@tu-berlin.de> Date: Wed, 30 Jul 2014 17:28:05 +0200 From: =?UTF-8?B?Q2hyaXN0b3BoIEjDtmdlcg==?= Organization: Technische =?UTF-8?B?VW5pdmVyc2l0w6R0IEJlcmxpbg==?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: caml-list@inria.fr References: <53D8EEF7.6060001@tu-berlin.de> <1E6C6D2A-E786-4EF5-85A0-0835A4F593F0@math.nagoya-u.ac.jp> In-Reply-To: <1E6C6D2A-E786-4EF5-85A0-0835A4F593F0@math.nagoya-u.ac.jp> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [Caml-list] Segmentation fault due to uncaught type error -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 30.07.2014 16:24, schrieb Jacques Garrigue: > If there is really a bug in the compiler, this is indeed bad. This > happens once in a while, and we fix that as soon as possible. A > good idea would be to check with a recent version of the compiler, > for instance the current state of the 4.02 branch, which is now > pretty stable. > > svn co http://caml.inria.fr/svn/ocaml/version/4.02 I am going to give it a try. Should be a no-brainer with opam. > Otherwise, if you know what the type error should be, you can try > to explain it with a snippet of code. Sometimes what the type > should be is not so clear :-) Hmm. Basically, I am using a lense like this: let state = { get = (fun a -> a#get_sim_state) ; set = fun a b -> b#set_sim_state a } In one point of the program, I am using it to get an option, in another I (and that's the error) use it to get the record directly. Then I feed the program with an object that delivers a option (i.e. get_sim_state yields an option of the state record) and the typechecker accepts that. The program is here: https://github.com/AMSUN-Berlin/ocsimrun/tree/typecheck_bug The relevant bits are in sim.ml and simTests.ml (and maybe monads.ml). I have removed all dependencies that are complicated to install. The rest should be a simple opam install ... && oasis setup && ./configure && make > And bug reports go to the bug tracking system. > http://caml.inria.fr/mantis/ It’s better if you can cut it down to > something understandable, but if you can’t we’ll still look into > it. Good to hear. - -- Christoph Höger Technische Universität Berlin Fakultät IV - Elektrotechnik und Informatik Übersetzerbau und Programmiersprachen Sekr. TEL12-2, Ernst-Reuter-Platz 7, 10587 Berlin Tel.: +49 (30) 314-24890 E-Mail: christoph.hoeger@tu-berlin.de -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlPZDwUACgkQhMBO4cVSGS/TGwCePh6rx4OI7uWnYieDjibP3Avc cZQAoLJMQNpXYUK77fTX6TnZh5KiXMQ4 =QSvy -----END PGP SIGNATURE-----