From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=5.0 tests=AWL,DNS_FROM_RFC_POST, HTML_MESSAGE,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 4BBFEBBAF for ; Sun, 3 Aug 2008 20:36:31 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnwCAKuXlUhC+Vq2mmdsb2JhbACCITAtjgM+AQEBAQEIBQgHEZcpg1w X-IronPort-AV: E=Sophos;i="4.31,301,1215381600"; d="scan'208";a="15696646" Received: from concorde.inria.fr ([192.93.2.39]) by mail3-smtp-sop.national.inria.fr with ESMTP; 03 Aug 2008 20:36:31 +0200 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m73IaUFp001269 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Sun, 3 Aug 2008 20:36:30 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnwCAKuXlUhC+Vq2mmdsb2JhbACCITAtjgM+AQEBAQEIBQgHEZcpg1w X-IronPort-AV: E=Sophos;i="4.31,301,1215381600"; d="scan'208";a="15696645" Received: from ik-out-1112.google.com ([66.249.90.182]) by mail3-smtp-sop.national.inria.fr with ESMTP; 03 Aug 2008 20:36:29 +0200 Received: by ik-out-1112.google.com with SMTP id c21so2376325ika.1 for ; Sun, 03 Aug 2008 11:36:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=kuJ0mu3o3JZGJLny9WDT1+xogzzfKbNpDJKeXYJjdUs=; b=bwuzzgdOl/L/aT7/hEbK8UHuGm6oK4YMhknKazOFFfzB21DoCZnmAOLZ63oE6yYDdt 6/BZUxlej+CPGB1YLOAxrdzKX+WHXq7kz741y4WMBnD+CQtz3z8vzicPBUGziV1jzdgR u80bOxptIxapuiVTv2vUPLit78prEnDsJ+Kvc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=qPzz/K6/xpMfqWNd4u8NzBttQoD0GxgQcmrP8SyHIxadbsXJT5fwCmKW901J2IhLfB tiWK/cs/uTmE3bpdKxKpZIJCZNMJG/iKFA74vYxI2g5ucxjyEqGlhJKs6Ry4mQb9enCd 601vuU6Hih6ImP47Rq5QbYhfobaFMbKC13VTQ= Received: by 10.210.58.17 with SMTP id g17mr12035470eba.190.1217788588512; Sun, 03 Aug 2008 11:36:28 -0700 (PDT) Received: by 10.210.72.8 with HTTP; Sun, 3 Aug 2008 11:36:28 -0700 (PDT) Message-ID: <527cf6bc0808031136k37887c02k6105b26b6adf5aaf@mail.gmail.com> Date: Sun, 3 Aug 2008 20:36:28 +0200 From: "blue storm" To: caml-list Subject: [ANN] pa_where 0.4 : backward declarations MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_27017_31105642.1217788588506" X-Miltered: at concorde with ID 4895FAAE.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 syntax:01 syntax:01 val:01 toplevel:01 toplevel:01 ocaml:01 subjective:01 camlp:01 ocaml:01 subjective:01 storm:98 0.4:98 0.4:98 highlighted:98 ------=_Part_27017_31105642.1217788588506 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline breaking caml-list's silence for anything else than some deep typing issue feels wrong :-P Let's make him feel wrong. mfp and I are pleased to announce the first public release of pa_where, a camlp4 extension enabling backward declarations. The "where" keyword, available in the revised syntax, and one of the truly missed Caml-light friends, is back. The syntax, however, is slightly different from the usual one : "where" should be followed by another declarative keyword, such as "let" : a where let a = b It is possible to use the "where let" form inside expressions, and the "where val" form at toplevel (structure items). Having a different syntaxic form for toplevel and local declarations is not the classical syntax standard, but was needed for disambiguation issues. It is however possible to use the good old "where a = b" syntax : in absence of any declarative keyword, the "let" keyword is used as default. The revised syntax "where" is restricted because of the "dangling and" issue. pa_where has no such restriction (what's one more ambiguity in the classical syntax anyway ?). Here are the two ambiguous cases : a where b where c => (a where b) where c let a = b where c and d => let a = (b where c and d) It would be possible to extend the backward declarations to other constructions such as "where module" or "where type". If you see any use for it, do not hesitate to ask for the feature or send a patch. The final syntax, wich I think is a good compromise, is the result of a debate on the #ocaml IRC channel (Freenode). If you are about to write a syntax extension yourself, you should really consider discussing your syntax considerations there (or maybe on the mailing-list ?) : it is amazing how helpful such a debate can be on a so subjective question. Thanks in advance for any testing, comment, criticism, request or patch. URL : http://bluestorm.info/camlp4/pa_where/list.php Available archives (test and META files included) : - http://bluestorm.info/camlp4/pa_where/pa_where-0.4-.tar.gz - http://bluestorm.info/camlp4/pa_where/pa_where-0.4-.zip Highlighted HTML source for online reading : - http://bluestorm.info/camlp4/pa_where/pa_where.ml.html ------=_Part_27017_31105642.1217788588506 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
    <mfp> breaking caml-list's silence for anything else than
         some deep typing issue feels wrong :-P

Let's make him feel wrong.

mfp and I are pleased to announce the first public release of
pa_where, a camlp4 extension enabling backward declarations. The
"where" keyword, available in the revised syntax, and one of the
truly missed Caml-light friends, is back.

The syntax, however, is slightly different from the usual one :
"where" should be followed by another declarative keyword, such
as "let" : a where let a = b

It is possible to use the "where let" form inside expressions,
and the "where val" form at toplevel (structure items). Having
a different syntaxic form for toplevel and local declarations is
not the classical syntax standard, but was needed for
disambiguation issues.

It is however possible to use the good old "where a = b" syntax :
in absence of any declarative keyword, the "let" keyword is used
as default.

The revised syntax "where" is restricted because of the "dangling
and" issue. pa_where has no such restriction (what's one more
ambiguity in the classical syntax anyway ?). Here are the two
ambiguous cases :
   a where b where c => (a where b) where c
   let a = b where c and d => let a = (b where c and d)

It would be possible to extend the backward declarations to other
constructions such as "where module" or "where type". If you see
any use for it, do not hesitate to ask for the feature or send
a patch.

The final syntax, wich I think is a good compromise, is the
result of a debate on the #ocaml IRC channel (Freenode). If you
are about to write a syntax extension yourself, you should really
consider discussing your syntax considerations there (or maybe on
the mailing-list ?) : it is amazing how helpful such a debate can
be on a so subjective question.

Thanks in advance for any testing, comment, criticism, request or
patch.


URL : http://bluestorm.info/camlp4/pa_where/list.php

Available archives (test and META files included) :
- http://bluestorm.info/camlp4/pa_where/pa_where-0.4-.tar.gz
- http://bluestorm.info/camlp4/pa_where/pa_where-0.4-.zip

Highlighted HTML source for online reading :
- http://bluestorm.info/camlp4/pa_where/pa_where.ml.html

------=_Part_27017_31105642.1217788588506--