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.3 required=5.0 tests=AWL,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 86520BC69 for ; Fri, 5 Oct 2007 18:05:34 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAFD9BUfAXQInh2dsb2JhbACCOzaLSAIBCAop X-IronPort-AV: E=Sophos;i="4.21,236,1188770400"; d="scan'208";a="3802419" Received: from concorde.inria.fr ([192.93.2.39]) by mail3-smtp-sop.national.inria.fr with ESMTP; 05 Oct 2007 18:05:34 +0200 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l95G5Xgg002399 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 5 Oct 2007 18:05:33 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAKf9BUdC+VyskGdsb2JhbACCOzaLSAIBAQcEBhERBQ X-IronPort-AV: E=Sophos;i="4.21,236,1188770400"; d="scan'208";a="2194507" Received: from ug-out-1314.google.com ([66.249.92.172]) by mail1-smtp-roc.national.inria.fr with ESMTP; 05 Oct 2007 18:05:33 +0200 Received: by ug-out-1314.google.com with SMTP id m3so491859ugc for ; Fri, 05 Oct 2007 09:05:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=J1qsPMUP1mmDUEICBitgD2RC13FV+4uLAiPQ3Idf8u4=; b=tgB9QLyRJkLxCoAHGbJ8nWNFh4cFj/gSpv1iHXsMjoAFyx6A71g1V+vU8ueYjtZ01HGJrxLRA4IdahyuJ+OGqMt8+SNG8SYN1i1TySe8OY4OmSkMJSZREcjE6A291ZRkr8gcSjrnSzEU4YulB023eP9mK4vHhLvIlaSHbzLjGiM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=DOjMTlmevClXTUVTGY1eW4ZOJCfBEh4gAM86K+qd+LcOZX0GPQ/FkkEEXe17gxxS25LXQLVajjpaI6QHnXhKhFQNMi1xbVakDE1JP+3hmybbWE4GyHrxRv32Dhu3pkdp5Vac3uTVahQfE722kdugMsNaMFdMTbxQXZDPYHTh0wg= Received: by 10.67.30.3 with SMTP id h3mr3442401ugj.1191600332799; Fri, 05 Oct 2007 09:05:32 -0700 (PDT) Received: by 10.66.249.6 with HTTP; Fri, 5 Oct 2007 09:05:32 -0700 (PDT) Message-ID: Date: Fri, 5 Oct 2007 12:05:32 -0400 From: "Ashish Agarwal" To: OCaml Subject: Re: [Caml-list] Depend-type beginner question In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_25930_31938943.1191600332792" References: <2EF33DCA-1E28-4F10-AEAB-F3258E976CA7@gmail.com> <4a051d930710050841t7de7dfa3qf695ee271b38bcb7@mail.gmail.com> X-Miltered: at concorde with ID 470660CD.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; existential:01 existential:01 1975:98 compile:01 compile:01 caml-list:01 seems:03 seems:03 typed:04 typed:04 distinguish:05 distinguish:05 variable:06 variable:06 beginner:12 ------=_Part_25930_31938943.1191600332792 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline > I can't get how the following could ever be typed at compile time: > > > if ... then [] else [a] > > Is this a 0-list or a 1-list ? do they just put an existential > variable -> n-list ? If this is it, it seems to me that you won't be > able to gain much information. The type system is not rich enough to distinguish between 0-lists' and 1-list's. It is just a list. ------=_Part_25930_31938943.1191600332792 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline > I can't get how the following could ever be typed at compile time:
>
>  > if ... then [] else [a]
>
> Is this a 0-list or a 1-list ? do they just put an existential
> variable -> n-list ? If this is it, it seems to me that you won't be
> able to gain much information.

The type system is not rich enough to distinguish between 0-lists' and 1-list's. It is just a list.

------=_Part_25930_31938943.1191600332792--