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 D0DA27F75C for ; Mon, 11 Aug 2014 10:59:19 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of goswin-v-b@web.de) identity=pra; client-ip=212.227.17.12; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="goswin-v-b@web.de"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of goswin-v-b@web.de designates 212.227.17.12 as permitted sender) identity=mailfrom; client-ip=212.227.17.12; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="goswin-v-b@web.de"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mout.web.de) identity=helo; client-ip=212.227.17.12; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="postmaster@mout.web.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgcCAKaF6FPU4xEMnGdsb2JhbABa12CBHQGBFxYQAQEBAQEGDQkJFCmEBAEFOk8LGAklDwUoiGEBGLpRH4YYF49TFoMZgR0BBJwuhxATkTc X-IPAS-Result: AgcCAKaF6FPU4xEMnGdsb2JhbABa12CBHQGBFxYQAQEBAQEGDQkJFCmEBAEFOk8LGAklDwUoiGEBGLpRH4YYF49TFoMZgR0BBJwuhxATkTc X-IronPort-AV: E=Sophos;i="5.01,840,1400018400"; d="scan'208";a="88945640" Received: from mout.web.de ([212.227.17.12]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 11 Aug 2014 10:59:19 +0200 Received: from frosties.localnet ([78.43.112.61]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0MbQOe-1X0KUT3NnY-00IlJg for ; Mon, 11 Aug 2014 10:59:17 +0200 Received: from mrvn by frosties.localnet with local (Exim 4.82) (envelope-from ) id 1XGlRk-0001n6-Q4 for caml-list@inria.fr; Mon, 11 Aug 2014 10:59:16 +0200 Date: Mon, 11 Aug 2014 10:59:16 +0200 From: Goswin von Brederlow To: caml-list@inria.fr Message-ID: <20140811085916.GC6277@frosties> References: <20140802092302.GA21347@annexia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Provags-ID: V03:K0:y6jxd9FZmZskx58uigEWPWRelpELLxoO1NcQ3hH0Z5xYKoHXhXY WdvowBJQjliVD0HApvm5FiwE4ZzFY4djBBdmNDpVplmHuohQGHJp6Xn89++AvJbAr6lPYZ6 P3QrxNJvbzA5s6pWX9HAZ3kNP8t/9SoY561VR7Ik0Wm6qwoxvz/DKNXcO+/Db9MmSB2+74s f2gmagKZZghGUfRwwZt/A== X-UI-Out-Filterresults: notjunk:1; Subject: Re: [Caml-list] OCaml 4.02 & {| in comments On Sat, Aug 02, 2014 at 09:31:01AM +0000, David Allsopp wrote: > > > Today I was reading about the new ppx extensions, and now I understand > > that {| is the syntax used for quoted strings. Puzzle solved! > > > > However my question is: Is it a bug that the compiler complains about > > {| inside a comment? > > It'll be for the same reason as parentheses and quote marks must already match... it allows for nested (* ... *) unlike /* ... */ in C. > > > David Or in other words: Ocaml comments are designed so that valid code can be commented out by surounfing it in (* ... *). That includes strings containing e.g. "*)": # let x = 1 (* "*)" *);; val x : int = 1 For that to work the inside of comments need to be parsed for strings and such. MfG Goswin