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=1.1 required=5.0 tests=AWL,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 discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 29634BC0A for ; Sun, 13 May 2007 22:08:06 +0200 (CEST) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.226]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4DK85rM014457 for ; Sun, 13 May 2007 22:08:05 +0200 Received: by nz-out-0506.google.com with SMTP id s1so1651152nze for ; Sun, 13 May 2007 13:08:02 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=VwYhgFz9LQhkXuNYAoNEJjXrDOujozLh+Oae/qXdzNEbpghhj2+TuqQmGA9loHfoi+eVzhp6m/IH1IFCE7/dedyJzOR6jNl9MY6Gfu8cpygEv+vqxvVoa9CNxd5zZGnU3c+vdCj9P+mo5RDuznBcHejC5ZULJNlJnE/UIskeeeg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=V/kLa6wYV1bS/UF99vrKUeXVgdhpUGf2k9iP0PKqwcSuIkJTtvv7eu2gjhdXdc0mILqxMN03JAZaD3pSVhr7t4q3NK9deUeGrC4AOcEVUjdbTKf5EEo/dVgMvm51VC5XfTkpcMMjUpufnO3qdULikPVhtGzzD/4AKxF6g6juRww= Received: by 10.115.23.12 with SMTP id a12mr691806waj.1179086881496; Sun, 13 May 2007 13:08:01 -0700 (PDT) Received: by 10.114.183.4 with HTTP; Sun, 13 May 2007 13:08:01 -0700 (PDT) Message-ID: Date: Sun, 13 May 2007 22:08:01 +0200 From: "Nicolas Pouillard" To: "ls-ocaml-developer-2006@m-e-leypold.de" Subject: Re: [Caml-list] Custom operators in the revised syntax Cc: caml-list@yquem.inria.fr In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200705111537.32561.jon@ffconsultancy.com> <200705120348.50308.jon@ffconsultancy.com> <1178944803.14691.28.camel@rosella.wigram> <20070512102254.GA862@furbychan.cocan.org> <464731DE.5070002@lix.polytechnique.fr> X-j-chkmail-Score: MSGID : 46477025.001 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 46477025.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; syntax:01 lix:01 coq:01 usefull:01 notation:01 infix:01 infix:01 notation:01 overloading:01 usefull:01 ocaml:01 camlp:01 frisch:01 wrote:01 arnaud:01 On 5/13/07, ls-ocaml-developer-2006@m-e-leypold.de wrote: > > Arnaud Spiwack writes: > > > About that, Coq uses something that proved itself to be rather > > usefull, though the problematic is a bit different. It's called > > notation scopes. The idea is that infix operators are defined in a > > specific scope. That you can either open locally using (here the scope > > is open)%scopeName, or globally by using Open Scope scopeName. When a > > scope is open, all the infix operators are interpreted as its > > definition in that scope. There are also a few more technicalities to > > make it even more fun (for instance, you can bind a scope to a type t, > > then, whenever an expression is inferred to be type t, the scope t is > > automatically opened, it's a very useful feature). > > > > This allows a milde, but rather usable notation overloading. > > > > I've been wondering for quite a while if such a policy would be > > reasonable/usefull for OCaml. > > I'd like to have a way to open moduls in a restricted scop, like This is what the simple openin extension does (emulates using camlp4). http://alain.frisch.fr/soft#openin -- Nicolas Pouillard