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 E176A7EE34 for ; Mon, 28 Mar 2016 03:12:46 +0200 (CEST) IronPort-PHdr: 9a23:n3OLyxz/wuddgJXXCy+O+j09IxM/srCxBDY+r6Qd0eMXIJqq85mqBkHD//Il1AaPBtWLragfwLCO4+jJYi8p39WoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6kO74TNaIBjjLw09fr2zQd6CyZ7snLrqq9X6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD89pozcNLUL37cqIkVvQYSW1+ayFmrPHs4DbZQASI/GpUd2wSnxFICkCR4xTzWpr6siLSue902S3cNsrzG+MaQzOnuoViQwb1hTxPGDcj6mDYl8E42K1SugigqAFy64vdfIHTMvNxebLUOM5cTGEHXN4HBH8JOZ+1c4ZaV7lJBu1ftYSo4gJW9RY= Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=garrigue@math.nagoya-u.ac.jp; spf=None smtp.mailfrom=garrigue@math.nagoya-u.ac.jp; spf=None smtp.helo=postmaster@mailhost.math.nagoya-u.ac.jp Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of garrigue@math.nagoya-u.ac.jp) identity=pra; client-ip=133.6.130.5; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="garrigue@math.nagoya-u.ac.jp"; x-sender="garrigue@math.nagoya-u.ac.jp"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of garrigue@math.nagoya-u.ac.jp) identity=mailfrom; client-ip=133.6.130.5; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="garrigue@math.nagoya-u.ac.jp"; x-sender="garrigue@math.nagoya-u.ac.jp"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mailhost.math.nagoya-u.ac.jp) identity=helo; client-ip=133.6.130.5; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="garrigue@math.nagoya-u.ac.jp"; x-sender="postmaster@mailhost.math.nagoya-u.ac.jp"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BjAADqg/hWigWCBoVchH66agENgXCGDQKBVxQBAQEBAQEBARABAQEKFgdQgi2CFQEBBCMEGQMBNQEBDgsOCgICJgICVwaIOa8sZ4RGAocmhCoBAQEBAQEEAQEBAQEBAQEBAQ8BBnyHFYJRhDqDAiuCK440iTKOBo8LjwseAQGCVoFgLTCIVgEBAQ X-IPAS-Result: A0BjAADqg/hWigWCBoVchH66agENgXCGDQKBVxQBAQEBAQEBARABAQEKFgdQgi2CFQEBBCMEGQMBNQEBDgsOCgICJgICVwaIOa8sZ4RGAocmhCoBAQEBAQEEAQEBAQEBAQEBAQ8BBnyHFYJRhDqDAiuCK440iTKOBo8LjwseAQGCVoFgLTCIVgEBAQ X-IronPort-AV: E=Sophos;i="5.24,403,1454972400"; d="scan'208";a="210585235" Received: from rabbit.math.nagoya-u.ac.jp (HELO mailhost.math.nagoya-u.ac.jp) ([133.6.130.5]) by mail2-smtp-roc.national.inria.fr with ESMTP; 28 Mar 2016 03:12:45 +0200 Received: from mailhost.math.nagoya-u.ac.jp (localhost [127.0.0.1]) by mailhost.math.nagoya-u.ac.jp (Postfix) with ESMTP id 6D83363E2 for ; Mon, 28 Mar 2016 10:12:42 +0900 (JST) Received: from mailhost.math.nagoya-u.ac.jp (rabbit-172.math.nagoya-u.ac.jp [172.16.254.254]) by mailhost.math.nagoya-u.ac.jp (Postfix) with ESMTP id 279C824B3; Mon, 28 Mar 2016 10:12:42 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=math.nagoya-u.ac.jp; h= subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=alpha; bh=QwhVTBHuAP9q2TrQWQgzGPdfLnY=; b=KoePS1pGYyQ9xR5TgPQiQOnfPsC3 MvpPBM2zHTtEd1ZFq+/RHGFNnPkM9u3tXCC4KWfcHPddziN1NMocG2q7db8E6zdw +YjssGZZpQDrKeAhqHgfypoNhXeey9mOwz48n4c4frBKZmHnIaJbhRBlHeXS3f1s mfqFs7GWPlgsrPA= DomainKey-Signature: a=rsa-sha1; h=Received:Subject:Mime-Version:Content-Type:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer; b=u2RVJai82EchFumiUfKj7AAw6mmN+APedIsIfSXPQOQeRh0gy2qb78oRc/zwRPIL5kCOl3+bh2j4FCANzdKFK9j/JuQ4mg+kXheaXr+UmyonDJq3hfJ0GKQ10xZvpRAKl/T+EaDjAwJ2VWjlOPuO7cjQoJOn1AxOwOy6zy0kipo=; c=nofws; d=math.nagoya-u.ac.jp; q=dns; s=alpha Received: from garrigue-mini.math.nagoya-u.ac.jp (garrigue-mini.math.nagoya-u.ac.jp [172.16.30.37]) by mailhost.math.nagoya-u.ac.jp (Postfix) with ESMTP id EFDD66522; Mon, 28 Mar 2016 10:11:19 +0900 (JST) Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Content-Type: text/plain; charset=utf-8 From: Jacques Garrigue In-Reply-To: Date: Mon, 28 Mar 2016 10:12:41 +0900 Cc: Mailing List OCaml Content-Transfer-Encoding: quoted-printable Message-Id: <2D2C7D68-D59A-407B-B83A-65622DF9CC25@math.nagoya-u.ac.jp> References: <86d1qgqu45.fsf@lpw25.net> To: Gregory Malecha X-Mailer: Apple Mail (2.3112) Subject: Re: [Caml-list] "Type constructor b would escape its scope" On 2016/03/28 03:52, Gregory Malecha wrote: >=20 > Thanks, Leo -- >=20 > This is exactly what I needed to know. I thought that the (type a) annota= tion was forcing the function to be polymorphic. For future reference, is t= here any way to write the annotation (that forces the function to be polymo= rphic) without having to write explicit =E2=80=98fun's? You should either write let generic_search_stream : =E2=80=98b. int option -> (internal_result, = =E2=80=98b) result_stream =3D =E2=80=A6 or =20 let generic_search_stream : type b. int option -> (internal_result, b) re= sult_stream =3D =E2=80=A6 where the latter one both requires polymorphism and defines a locally abstr= act type, i.e. probably the behavior you expect with (type b). Jacques