From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id E0F31D463 for ; Tue, 1 Nov 2005 08:58:27 +0100 (CET) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.206]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jA17wQa4004015 for ; Tue, 1 Nov 2005 08:58:27 +0100 Received: by xproxy.gmail.com with SMTP id s15so1220194wxc for ; Mon, 31 Oct 2005 23:58:26 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=WvEJIJTSqX9OBiEQS8DwAOqyZvow9vpua2T1kcxhmvIXzsOfGZakdpl+z55qbVQVcN4HF9g6pi3WDDy9uIy7jJLtoTO8Krw1E6K5kUSC880Kvz9xc+05gdXtN9uirgTvhN8k6frslTCeJ54f245zVPNeVkwFEy4mZVqN7a1zFcg= Received: by 10.65.22.10 with SMTP id z10mr903012qbi; Mon, 31 Oct 2005 23:58:26 -0800 (PST) Received: by 10.65.23.20 with HTTP; Mon, 31 Oct 2005 23:58:26 -0800 (PST) Message-ID: Date: Tue, 1 Nov 2005 20:58:26 +1300 From: Jonathan Roewen To: caml-list@yquem.inria.fr Subject: [Caml-list] Type inference problem MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Miltered: at nez-perce with ID 43672022.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 inference:01 stdlib:01 ocamlc:01 complains:01 expression:01 int:01 int:01 constraint:01 constraint:01 unit:03 unit:03 problem:05 wrong:08 correct:08 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 Hi, I can't figure out what's wrong with my code =3D( It's on a paste site, so will only last about 24 hours or so. http://rafb.net/paste/results/Uux57B97.html jonathan@moonbeam:~/dst/stdlib$ ocamlc VFS.ml File "VFS.ml", line 106, characters 3-6: This expression has type int but is here used with type unit It -has- to return int ;-) But I have no idea where the type constraint is coming from that wants it to return unit. Change it to return unit, and where it's used complains it doesn't return type int (so that constraint is correct). Jonathan