From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id D86087EE49 for ; Sat, 23 Feb 2013 00:09:43 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of nanaki@gmail.com) identity=pra; client-ip=209.85.212.50; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="nanaki@gmail.com"; x-sender="nanaki@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of nanaki@gmail.com designates 209.85.212.50 as permitted sender) identity=mailfrom; client-ip=209.85.212.50; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="nanaki@gmail.com"; x-sender="nanaki@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-vb0-f50.google.com) identity=helo; client-ip=209.85.212.50; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="nanaki@gmail.com"; x-sender="postmaster@mail-vb0-f50.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArIBAHj5J1HRVdQyk2dsb2JhbABEDq8xiVcBiCKBBAgWDgEBAQEJCQsJFAQjgh8BAQQBJxkBGxILAQMBCwYFBAcDFyEiAREBBQEKEgYTCAoJh2QBAwkGDKEMjDKCe4RAChknAwpZiGUBBQyOfgQHg0ADiGiNUoEdjWQWKYJTgRhg X-IPAS-Result: ArIBAHj5J1HRVdQyk2dsb2JhbABEDq8xiVcBiCKBBAgWDgEBAQEJCQsJFAQjgh8BAQQBJxkBGxILAQMBCwYFBAcDFyEiAREBBQEKEgYTCAoJh2QBAwkGDKEMjDKCe4RAChknAwpZiGUBBQyOfgQHg0ADiGiNUoEdjWQWKYJTgRhg X-IronPort-AV: E=Sophos;i="4.84,717,1355094000"; d="scan'208";a="4146651" Received: from mail-vb0-f50.google.com ([209.85.212.50]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 23 Feb 2013 00:09:43 +0100 Received: by mail-vb0-f50.google.com with SMTP id ft2so733478vbb.37 for ; Fri, 22 Feb 2013 15:09:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=SglNQKbXyPYqM7Ti7yaCIUVOUb5WpfAHRPtwVxjxfQA=; b=mOlYqhrAFRDlwAQe9WSe/FhN8mPIHeYvE7YD366jnsK6rdFCmZ5+2MLsa7QRByuoqJ 7wdeKFcvn+QC0AoZFy+JAo34rG5vicAO7p91hul97m9CPzQmJ/xhNmwFbAf4rzmLg+uw 5evpFyxRj1Wz6AXda/NDJmMtwIaRpd0J8kYdevJKWKKZViS+MH9uKDUeaO/O0faq6T1l NYiCuNkRZCbFKseEzmInVL9lZ2oMp50e6yP2NW6SErRhSXnkEm4DXjwrzyqhBVXsr/oh 0eGYIs3QzFXSWR4S+RmyV60pva6hf8uM+ctxLg24ueZdVdkN+qK3KZDNRbwelGci2fci 4MCg== MIME-Version: 1.0 X-Received: by 10.52.90.140 with SMTP id bw12mr4425528vdb.50.1361574582091; Fri, 22 Feb 2013 15:09:42 -0800 (PST) Received: by 10.58.235.73 with HTTP; Fri, 22 Feb 2013 15:09:41 -0800 (PST) In-Reply-To: References: <5127AFD7.5040002@gmail.com> <5127D1AB.6090204@gmail.com> Date: Fri, 22 Feb 2013 15:09:41 -0800 Message-ID: From: Jeff Meister To: Leo White Cc: Matej Kosik <5764c029b688c1c0d24a2e97cd764f@gmail.com>, OCaml Content-Type: multipart/alternative; boundary=20cf307f34d44d08b604d658495e Subject: Re: [Caml-list] strange typechecking result --20cf307f34d44d08b604d658495e Content-Type: text/plain; charset=ISO-8859-1 As I understand it, polymorphic recursive functions require type annotations because inferring their types is undecidable in the general case. On Fri, Feb 22, 2013 at 1:06 PM, Leo White wrote: > I would like to ask: >> >> - Where is that restriction explained? >> (I've searched Ocaml reference manual for "monomorphic" but nothing >> relevant seemed to come up) >> >> - Where are things like: >> >> 'a. 'a -> unit >> >> described? >> >> > I'm not sure if the restriction is explained anywhere but the solution is > described in: > > http://caml.inria.fr/pub/docs/**manual-ocaml-4.00/manual021.**html#toc79 > > Regards, > > Leo > > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/**arc/caml-list > Beginner's list: http://groups.yahoo.com/group/**ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-**bugs > --20cf307f34d44d08b604d658495e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
As I understand it, polymorphic recursive functions requir= e type annotations because inferring their types is undecidable in the gene= ral case.


On Fri, Feb 22, 2013 at 1:06 PM, Leo White <lpw25@cam.ac.uk> w= rote:
I would like to ask:

- Where is that restriction explained?
=A0 (I've searched Ocaml reference manual for "monomorphic" b= ut nothing
=A0 =A0relevant seemed to come up)

- Where are things like:

=A0 =A0 =A0'a. 'a -> unit

=A0 described?


I'm not sure if the restriction is explained anywhere but the solution = is described in:

=A0http://caml.inria.fr/pub/docs/manual-ocam= l-4.00/manual021.html#toc79

Regards,

Leo

--20cf307f34d44d08b604d658495e--