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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 732827F75C for ; Wed, 13 Aug 2014 17:30:15 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of ag400@leicester.ac.uk) identity=pra; client-ip=143.210.16.38; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ag400@leicester.ac.uk"; x-sender="ag400@leicester.ac.uk"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of ag400@leicester.ac.uk) identity=mailfrom; client-ip=143.210.16.38; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ag400@leicester.ac.uk"; x-sender="ag400@leicester.ac.uk"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@rhebok.le.ac.uk) identity=helo; client-ip=143.210.16.38; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ag400@leicester.ac.uk"; x-sender="postmaster@rhebok.le.ac.uk"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArABAFaD61OP0hAmnGdsb2JhbABag19XgnqrTgaeWohhFhABAQEBAQgLCQkUKYQtBEcKPRYLAgQHAwIBAgFYCAEBiD4EoVyPK5BThQSFfIltgmOBUwWEUoE+jQ2BSlyEJ4QmjHeKDWsB X-IPAS-Result: ArABAFaD61OP0hAmnGdsb2JhbABag19XgnqrTgaeWohhFhABAQEBAQgLCQkUKYQtBEcKPRYLAgQHAwIBAgFYCAEBiD4EoVyPK5BThQSFfIltgmOBUwWEUoE+jQ2BSlyEJ4QmjHeKDWsB X-IronPort-AV: E=Sophos;i="5.01,857,1400018400"; d="ml'?mli'?scan'208";a="74726555" Received: from rhebok.le.ac.uk ([143.210.16.38]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 13 Aug 2014 17:30:14 +0200 Received: from cpc22-nfds13-2-0-cust173.8-2.cable.virginm.net ([86.24.145.174]:37849 helo=[192.168.0.9]) by rhebok.le.ac.uk with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XHaVB-0000sC-7l for caml-list@inria.fr; Wed, 13 Aug 2014 16:30:13 +0100 Message-ID: <53EB8484.5070907@le.ac.uk> Date: Wed, 13 Aug 2014 16:30:12 +0100 From: Andrea Giugliano User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: caml-list@inria.fr Content-Type: multipart/mixed; boundary="------------040701060501050005070007" X-UoL-Id: 2f3fbf13dd0d023150baf9446a207a36@1XHaVB-0000sC-7l@rhebok.le.ac.uk X-Authenticated-User: ag400 X-Validation-by: ag400@leicester.ac.uk Subject: [Caml-list] Parse error with camlp4 while sources compile This is a multi-part message in MIME format. --------------040701060501050005070007 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Dear list, I am trying to test my ocaml application using a test coverage tool called bisect (http://bisect.x9c.fr/index.html). This tool uses camlp4 to instrument the source code, i.e. adding the check points to say that the source code has been explored by the tests. When I try to instrument my application, I get the following error from camlp4: Parse error: [module_type] expected after ":" (in [module_declaration]) Error while running external preprocessor Is it possible that camlp4 does not support the functor feature of OCaml? Has anyone had this error before? I googled for the error string and similar errors, but I could not find anything promising. I also searched the archives of this mailing list and the wg-camlp4 mailing list, but nothing similar was present. The following source files raise the same error (they successfully compile though!): (* test.mli -------------- *) module type a = sig type t end module A (AO : a) : sig val f : AO.t -> bool end (* test.ml --------------- *) module type a = sig type t end module A (AO : a) = struct let f ( x : AO.t) = true end let _ = print_endline "test" (* ------------------------- *) I attached them and the Makefile that I am using to create the executable. If you want to reproduce the error, you need to have installed Ocaml 4.01, ocamlfind and the last version of bisect (the most comfortable installation is through OPAM: opam install ocamlfind opam install bisect). Thanks for your attention, Andrea Giugliano --------------040701060501050005070007 Content-Type: text/plain; charset=UTF-8; name="Makefile" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="Makefile" T0NBTUxGSU5EPW9jYW1sZmluZApDQU1MT1BUPSQoc2hlbGwgY29tbWFuZCAt diBvY2FtbG9wdC5vcHQgfHwgY29tbWFuZCAtdiBvY2FtbG9wdCB8fCBlY2hv IG1pc3Npbmdfb2NhbWxvcHQpCldBUk5JTkdTPS13IC0yNi04LTIzCkNPTVBG TEFHUz0kKFdBUk5JTkdTKSAKQklTRUNURElSPSQoc2hlbGwgJChPQ0FNTEZJ TkQpIC1xdWVyeSBiaXNlY3QpCgp0ZXN0Lm5hdGl2ZToKCSQoQ0FNTE9QVCkg LUkgJChCSVNFQ1RESVIpIC1wcCAnY2FtbHA0byBzdHIuY21hICQoQklTRUNU RElSKS9iaXNlY3RfcHAuY21vJyAkKENPTVBGTEFHUykgLUkgJChCSVNFQ1RE SVIpIGJpc2VjdC5jbXhhIC1vIG15IHRlc3QubWxpIHRlc3QubWwKCmp1c3RO YXRpdmU6CgkkKENBTUxPUFQpICQoQ09NUEZMQUdTKSAtbyBteSB0ZXN0Lm1s aSB0ZXN0Lm1sCg== --------------040701060501050005070007 Content-Type: text/x-ocaml; name="test.ml" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="test.ml" module type a = sig type t end module A (AO : a) = struct let f ( x : AO.t) = true end let _ = print_endline "!" --------------040701060501050005070007 Content-Type: text/x-ocaml; name="test.mli" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="test.mli" module type a = sig type t end module A (AO : a) : sig val f : AO.t -> bool end --------------040701060501050005070007--