From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by c5ff346549e7 (Postfix) with ESMTP id F08725D4 for ; Sun, 17 Jun 2018 06:39:44 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.51,233,1526335200"; d="scan'208,217";a="332101689" Received: from sympa.inria.fr ([193.51.193.213]) by mail2-relais-roc.national.inria.fr with ESMTP; 17 Jun 2018 08:39:42 +0200 Received: by sympa.inria.fr (Postfix, from userid 20132) id B6FEE82474; Sun, 17 Jun 2018 08:39:42 +0200 (CEST) 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 34FD882474 for ; Sun, 17 Jun 2018 08:39:36 +0200 (CEST) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=vietlq85@gmail.com; spf=Pass smtp.mailfrom=vietlq85@gmail.com; spf=None smtp.helo=postmaster@mail-ua0-f176.google.com IronPort-PHdr: =?us-ascii?q?9a23=3Amupqjh3nqZsfUgdhsmDT+DRfVm0co7zxezQtwd8Z?= =?us-ascii?q?se0VL/ad9pjvdHbS+e9qxAeQG9mDtrQc06L/iOPJYSQ4+5GPsXQPItRndiQuro?= =?us-ascii?q?EopTEmG9OPEkbhLfTnPGQQFcVGU0J5rTngaRAGUMnxaEfPrXKs8DUcBgvwNRZv?= =?us-ascii?q?JuTyB4Xek9m72/q99pHPYwhEniaxba9vJxiqsAvdsdUbj5F/Iagr0BvJpXVIe+?= =?us-ascii?q?VSxWx2IF+Yggjx6MSt8pN96ipco/0u+dJOXqX8ZKQ4UKdXDC86PGAv5c3krgfM?= =?us-ascii?q?QA2S7XYBSGoWkx5IAw/Y7BHmW5r6ryX3uvZh1CScIMb7Vq4/Vyi84Kh3SR/okC?= =?us-ascii?q?YHOCA/8GHLkcx7kaZXrAu8qxBj34LYZYeYP+d8cKzAZ9MXXWVOXshTWCJBDI2y?= =?us-ascii?q?bJYBAfQdMutDtYbxu0EDoAGiCQWwBu7izCJDiH/s3a091uQsCQ7J3A0+ENISrX?= =?us-ascii?q?/aqsv6P7oVXOCrzanH0ynDb/dP2Tr+6IXFaR8hofSWUrJxdcrd01UgFwTAjliJ?= =?us-ascii?q?r4HuIjCb1vwVvmSF8+ZtUfijhm0npg1rvDSj28UhhpPUio8Xy13J8zhyzpwvKt?= =?us-ascii?q?2iUkF7ZMapEJtOuCGeMIt7WsYiTHtpuCY+07EGpIS0cDQTxJQp2hLSaf2Kf5KH?= =?us-ascii?q?4hLkU+aRLjN4i2x/dL2jgBay9FCsyuz6VsaqzFZHtjRJnsXIu3wX1BHe6tKLRu?= =?us-ascii?q?Vg8kqjwzqDygLe5+BcLUAxj6XbKpohwrAqlpoUtETOBjH2mETog6+KckUk4+ul?= =?us-ascii?q?5uT8b7Xpo5+TLY50igXkPqsyncy/BPw0MhISUGiD5eS8yLrj8FXlT7pQi/02lr?= =?us-ascii?q?DVsJTbJcQAuq60GBRV04Ym6xanFTiqytUYnX8dLFJEYh2LlYbpO0udaMz/WNy/?= =?us-ascii?q?jkjktSpx2/DXdunkH4/RLmmFm7fsYZ5y7kddzEw4ytUJtLxODbRUHvP+RgfVuZ?= =?us-ascii?q?SMEB40Lwitk7vPB9B014dYUmWKVPzKeJjOuEOFs7p8a9KHY5UY7XOkc6B8tqze?= =?us-ascii?q?yEQhkFpYRpGHmJ4eaXS2BPNjehzLbn/lg9NHGmAP7FNnEL7azWaaWDsWXE6cGr?= =?us-ascii?q?om72hiWo2jBIbHAIuqhe7ZhXrpLthtfmlDT2u0PzLoeoGDAalebSuTJop8m2RB?= =?us-ascii?q?W+H+Fcku0hahsAK8wL1ifLLZ?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0DjAAB/ASZbhrDZVdFbHAEBAQQBAQoBA?= =?us-ascii?q?YUpFRODeYEdglCEF4xSgX+IDxqMSIF4C4RsAoJSGQcBBDAYAQIBAQEBAQEBAQE?= =?us-ascii?q?TAQEBCAsLCCkjDII1JAGCTwEEASMdARsdAQMBCwYFBAEGNwICIQEBEQEFARwGE?= =?us-ascii?q?4MlgWgBAw0InmU8iwiBfwUBF4JyBYNIChkmDVVQB4FgAgYSiEKCE4EPgwyCUYI?= =?us-ascii?q?OgxeCVQKBIwEBl0UrAQYCAYEsBIpRgwiNO4pfhl8PIYEgggpwUDFsgSaCFRqDT?= =?us-ascii?q?opTPjCQPwEB?= X-IPAS-Result: =?us-ascii?q?A0DjAAB/ASZbhrDZVdFbHAEBAQQBAQoBAYUpFRODeYEdglC?= =?us-ascii?q?EF4xSgX+IDxqMSIF4C4RsAoJSGQcBBDAYAQIBAQEBAQEBAQETAQEBCAsLCCkjD?= =?us-ascii?q?II1JAGCTwEEASMdARsdAQMBCwYFBAEGNwICIQEBEQEFARwGE4MlgWgBAw0InmU?= =?us-ascii?q?8iwiBfwUBF4JyBYNIChkmDVVQB4FgAgYSiEKCE4EPgwyCUYIOgxeCVQKBIwEBl?= =?us-ascii?q?0UrAQYCAYEsBIpRgwiNO4pfhl8PIYEgggpwUDFsgSaCFRqDTopTPjCQPwEB?= X-IronPort-AV: E=Sophos;i="5.51,233,1526335200"; d="scan'208,217";a="269019370" Received: from mail-ua0-f176.google.com ([209.85.217.176]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 17 Jun 2018 08:39:35 +0200 Received: by mail-ua0-f176.google.com with SMTP id d7-v6so8850743uam.13 for ; Sat, 16 Jun 2018 23:39:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2USEOLfoDjPq4OLwe7vShPdxNYoHD/s/l+HM+pMkYyA=; b=X0MGaL3CswIyZxlZ9PUgO2mtqGgxFr4bIXcWw55Rg0SnNXO3FWdCgSESzXto65zcuA sJB8JGm8x2panXbhL9hZjN8s8zKK+aRlISWYHddDNTFw0/rAQdVq+fWxU88Rf3yUufxH L1qoiNSzod1OqnBtUmjBt/l94uwNN+Tk2b/uoQ8jhADfO9VVR99wRDzitGHivIrIVu9I LNuwhuiZ/p8qzzCV2g7iCYn5xofPRTeAYrgOMffy8RppI/m7trOaSr6g5BGwn8VE1gfm HMm9Jgz5wCwMVnJG1074fPrmUjgbEuXwIs95aicIaqrdFtXgzz8JNMPLWDJgd5eUBeJ6 yD0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2USEOLfoDjPq4OLwe7vShPdxNYoHD/s/l+HM+pMkYyA=; b=gdSsMf+BHgDmS6karQjTqHvpoKghgTIeTyuRp++CTCT4QQKtZJKpr6cDlr8R0CrBBB iM56ZRmSWC00Fcv0hQu4eMdosq65dHqzFOSuxkHs0lPV6bsgN9bz46QmDlq4eWqFbPjS yW0gqMVFwBprexUvFkrOIA8FXWnHD0UvDTuq8OQai6FuJJKilE4nZQZ7M1AFKGFrPw8P FCKiIQyr+2pWyVEIVwTkQqeMRCgvNpHhzoAyWAJ9edQqtmOVgfWaZ6EXGMwzWxT/Re52 46amFg5Gg7sK/zs3gEm9BwLr0RCg3XCbqq4zfKWwuFJPnav8AZi7kapyAJtsNDln8NGL ctYg== X-Gm-Message-State: APt69E22/r7V6MaW+Y+6uwpGb+bqy9Fe3/6j6Su+h96SccwJr1tLf/xP DJyqvpNewTwCrAZiOb73eNswpZJv85iQEcZs/TGZ9w== X-Google-Smtp-Source: ADUXVKI0IIlhiKUt+TdWYl66VLagAun5W0a8h3husWQCUwbz38o35UfWugKO5nknh822LHaSJ603E1iCb02++dPAYv0= X-Received: by 2002:ab0:1e41:: with SMTP id n1-v6mr5039908uak.146.1529217573470; Sat, 16 Jun 2018 23:39:33 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Viet Le Date: Sun, 17 Jun 2018 07:39:22 +0100 Message-ID: To: Chet Murthy Cc: OCaml Mailing List Content-Type: multipart/alternative; boundary="000000000000404636056ed0b626" Subject: Re: [Caml-list] a question about GADTs Reply-To: Viet Le X-Loop: caml-list@inria.fr X-Sequence: 16945 Errors-to: caml-list-owner@inria.fr Precedence: list Precedence: bulk Sender: caml-list-request@inria.fr X-no-archive: yes List-Id: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --000000000000404636056ed0b626 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable What is PL? I would appreciate more descriptive language. I can see that Janestreet claim huge benefits from GADTs (check their blog). I also came across a blog about writing GraphQL server using OCaml & GADT. Worth checking out. String/print formatting used to rely on unsafe Obj.magic. For a few years OCaml string/print formatting is using GADT that provide compile time safety. Lookup format6, and OCaml GADT for string/print formatting. That=E2= =80=99s the most real-world usage. Viet On Sun, 17 Jun 2018 at 04:44, Chet Murthy wrote: > I'm curious: is there any real-world use of GADTs, other than in PL > itself? I mean, writing interpreters, compilers, and such? Any non-PL u= se? > > Again, not trying to start a flame-war -- just *curious*. > > -- Kind regards, Viet --=20 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= --000000000000404636056ed0b626 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
What is PL? I would appreciate more descriptive lang= uage.

I can see th= at Janestreet claim huge benefits from GADTs (check their blog).

I also came across a blog about wr= iting GraphQL server using OCaml & GADT. Worth checking out.

String/print formatting used to re= ly on unsafe Obj.magic. For a few years OCaml string/print formatting is us= ing GADT that provide compile time safety. Lookup format6, and OCaml GADT f= or string/print formatting. That=E2=80=99s the most real-world usage.
=

Viet

On Sun, 17 Jun 2018 at 04:44, Chet Murthy <murthy.chet@gmail.com> wrote:
<= /div>
I'm= curious: is there any real-world use of GADTs, other than in PL itself?=C2= =A0 I mean, writing interpreters, compilers, and such?=C2=A0 Any non-PL use= ?

Agai= n, not trying to start a flame-war -- just *curious*.

--
Kind regards,
<= /div>
Viet
--000000000000404636056ed0b626--