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.4 required=5.0 tests=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 57212BC0A for ; Sat, 13 Jan 2007 06:37:58 +0100 (CET) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.233]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l0D5bvXo032002 for ; Sat, 13 Jan 2007 06:37:57 +0100 Received: by wr-out-0506.google.com with SMTP id 69so715772wra for ; Fri, 12 Jan 2007 21:37:57 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding; b=C5no9UwJWjrDQHTZ/L37NNE39qp/4xVEapZ8Cmcz+/522mTfBjHtRb/wReIPW6nUQxfJqc8rDreLYOZSr4cpitU3nQLPghHY5facnpAoMW6CI8dAALy4Y+GzWRQVic4KLmg86TDgMLuY5kzx4I6bDfVm3iTzh0wLf0zxMmuR880= Received: by 10.65.237.19 with SMTP id o19mr2105507qbr.1168666676619; Fri, 12 Jan 2007 21:37:56 -0800 (PST) Received: from ?192.168.0.18? ( [69.155.31.57]) by mx.google.com with ESMTP id f13sm2663784qba.2007.01.12.21.37.55; Fri, 12 Jan 2007 21:37:56 -0800 (PST) Message-ID: <45A87011.8080203@gmail.com> Date: Fri, 12 Jan 2007 23:37:21 -0600 From: Edgar Friendly User-Agent: Thunderbird 1.5.0.9 (X11/20061206) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Ocaml compiler features Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-j-chkmail-Score: MSGID : 45A87035.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 45A87035.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 compiler:01 ocaml:01 compiler:01 variants:01 variants:01 arrays:01 edgar:98 monster:98 parsed:01 precedence:01 precedence:01 integer:01 int:01 int:01 There's a few things I'd like to fix about ocaml, and I should probably air these and get feedback/help before jumping in and getting lost in the compiler code. First, I'd like to fix grouping within the if/then/else construct. This is parsed fine: if y=1 then let z = 2 in print_int y; print_int z; else print_string "not one" But the following isn't accepted: if y=1 then print_int y; print_int 2; else print_string "not one" I understand that the let statement groups the following compound expression into one statement for the then-clause, so it's a precedence problem. Would it really be enough to raise the precedence of ; higher than that of if/then? Is there any reason this hasn't been done already? Second, I have some ideas of things to do with Atomic Variants (sounds like they could be a monster in a sci-fi movie). First thing is to somehow allow the use of a type composed of all Atomic (non-polymorphic) Variants as an integer type. One thing I want to do is index arrays with them. Yes, I could use records, but then I couldn't iterate across the structure. Thanks for listening, and tune in next time for more crazy ideas. E.