From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 4D8A4BCA8 for ; Sat, 2 Apr 2005 03:28:55 +0200 (CEST) Received: from ptb-relay03.plus.net (ptb-relay03.plus.net [212.159.14.214]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j321Ss7K031843 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 2 Apr 2005 03:28:55 +0200 Received: from [80.229.56.224] (helo=chetara) by ptb-relay03.plus.net with esmtp (Exim) id 1DHXRW-000HcG-Au for caml-list@yquem.inria.fr; Sat, 02 Apr 2005 01:28:54 +0000 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Type error Date: Sat, 2 Apr 2005 02:29:33 +0100 User-Agent: KMail/1.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200504020229.33295.jon@ffconsultancy.com> X-Miltered: at concorde with ID 424DF556.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; polluting:01 ocaml:01 height:98 ...:98 ...:98 frog:98 expression:01 int:01 int:01 data:02 data:02 caml:02 width:97 objective:02 variables:02 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: I've got a type error: This type of expression, -> unit, contains type variables that cannot be generalized which appears with the form: let f = let t = ref None in fun data -> ... but not in the unnested form: let t = ref None let f = fun data -> ... Is that supposed to happen? I thought those two forms were exactly equivalent (except for polluting the outer namespace in the latter case). -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. Objective CAML for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists