From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id A7C207F088 for ; Tue, 17 Nov 2015 19:14:04 +0100 (CET) IronPort-PHdr: 9a23:gBRx6B0djILMVruAsmDT+DRfVm0co7zxezQtwd8ZsegRLPad9pjvdHbS+e9qxAeQG96LtrQZ2qGH7OjJYi8p39WoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6kO74TNaIBjjLw09fr2zQd6PyZnmnLHts7ToICx2xxOFKYtoKxu3qQiD/uI3uqBFbpgL9x3Sv3FTcP5Xz247bXianhL7+9vitMU7q3cYk7sb+sVBSaT3ebgjBfwdVWx+cjN92Mq+khLKSA/Hw3IdVmQQnVJsAhPZpEXxV5L19y/7rfZV2S+APMSwQ6piChq46KI+cgLuiC4BOHYd8SmDkNF2jKtdrzq5oAdjzomSZoyJYqktNpjBdM8XEDISFv1aUDZMV8blN9MC Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=runhang@posteo.net; spf=Pass smtp.mailfrom=runhang@posteo.net; spf=None smtp.helo=postmaster@mout01.posteo.de Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of runhang@posteo.net) identity=pra; client-ip=185.67.36.65; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="runhang@posteo.net"; x-sender="runhang@posteo.net"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of runhang@posteo.net designates 185.67.36.65 as permitted sender) identity=mailfrom; client-ip=185.67.36.65; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="runhang@posteo.net"; x-sender="runhang@posteo.net"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mout01.posteo.de) identity=helo; client-ip=185.67.36.65; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="runhang@posteo.net"; x-sender="postmaster@mout01.posteo.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0B+AABjbUtWk0EkQ7lewUSCKIFlh2E6EgEBAQEBAQEBEAEBAQEHCwsJIS6CLYIxBIEHAiYCX4hFnCGPcJBBAQEBAR6BAYdjimMvgRUFjhGIOI0riRmTLCgGglyBfh2FPgEBAQ X-IPAS-Result: A0B+AABjbUtWk0EkQ7lewUSCKIFlh2E6EgEBAQEBAQEBEAEBAQEHCwsJIS6CLYIxBIEHAiYCX4hFnCGPcJBBAQEBAR6BAYdjimMvgRUFjhGIOI0riRmTLCgGglyBfh2FPgEBAQ X-IronPort-AV: E=Sophos;i="5.20,309,1444687200"; d="scan'208";a="154172333" Received: from mout01.posteo.de ([185.67.36.65]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Nov 2015 19:14:03 +0100 Received: from dovecot03.posteo.de (dovecot03.posteo.de [172.16.0.13]) by mout01.posteo.de (Postfix) with ESMTPS id 249A42088D for ; Tue, 17 Nov 2015 19:14:03 +0100 (CET) Received: from mail.posteo.de (localhost [127.0.0.1]) by dovecot03.posteo.de (Postfix) with ESMTPSA id 3p0b4p5CDpz5vNC for ; Tue, 17 Nov 2015 19:14:02 +0100 (CET) From: Runhang Li Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-Id: Date: Tue, 17 Nov 2015 10:14:03 -0800 To: Ocaml Mailing List Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) X-Mailer: Apple Mail (2.2104) X-Validation-by: runhang@posteo.net Subject: [Caml-list] GADT and weak polymorphism Hi, camels Consider the following module: module HList =3D struct type (_, _) hlist =3D | Empty : ('a, 'a) hlist | Cons : 'c * ('a, 'b) hlist -> ('c -> 'a, 'b) hlist let cons : type a b c. c -> (a, b) hlist -> (c -> a, b) hlist =3D fun h tl -> Cons (h, tl) let empty =3D Empty let ( **> ) =3D cons let l =3D '2' **> "str" **> empty end The type of ``l`` is ``(char -> string -> =E2=80=98_a, =E2=80=98_a) hlist``= . I would like to know the reason that weak polymorphism shows up here. Thank you Kindly, Runhang