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 B70027EEF8 for ; Fri, 31 Jul 2015 15:48:33 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of agarwal1975@gmail.com) identity=pra; client-ip=209.85.212.174; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="agarwal1975@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of agarwal1975@gmail.com designates 209.85.212.174 as permitted sender) identity=mailfrom; client-ip=209.85.212.174; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="agarwal1975@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-wi0-f174.google.com) identity=helo; client-ip=209.85.212.174; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="postmaster@mail-wi0-f174.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BjAgAifLtVlK7UVdFbhFcGgx2te5RGB0wBAQEBAQESAQEBAQcLCwkfMIQaIhEEGQEbHgMSCAECBTcCJAERAQUBIhsah3YBAxKhMYIFgSw+MYs/gWyCeYsjChknDVeEfgEFDpM3gUMFlHIGjEmXcxIjgRcXhCgiMYJMAQEB X-IPAS-Result: A0BjAgAifLtVlK7UVdFbhFcGgx2te5RGB0wBAQEBAQESAQEBAQcLCwkfMIQaIhEEGQEbHgMSCAECBTcCJAERAQUBIhsah3YBAxKhMYIFgSw+MYs/gWyCeYsjChknDVeEfgEFDpM3gUMFlHIGjEmXcxIjgRcXhCgiMYJMAQEB X-IronPort-AV: E=Sophos;i="5.15,584,1432591200"; d="scan'208";a="172275849" Received: from mail-wi0-f174.google.com ([209.85.212.174]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 31 Jul 2015 15:48:33 +0200 Received: by wicgj17 with SMTP id gj17so18746747wic.1 for ; Fri, 31 Jul 2015 06:48:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=AyuAru6hSmThpznR/r+HJdAxISrAhIza4JEYEjuXBSE=; b=YOVCdIMOXI+uVeUQT28JYc5SsAVZU1VoK/hd82Nm34mimIAs0VudpkBt7879BfO9Q6 EIYfBLj3BFYvS0Hc9me/UEgbFd1f1dfvOsW3C9uGWUo3sLKZtp+HnFCZF8KDfPuKsfVZ 5RMSpc/Ev4Mod3mCTsQ44orpKXHC7YNLw5iPIwxr/njE2qbUZMf4ZTcY2Yd3lP8hO4kJ DnEUI7vknZV5qgmRQ7UyjJdVeBFNm5sTi9guGanQaRAr2yFJ8MY+4a0MH8tGY/R/zz7Y qATRiF5+2XRRB78xZQ/lcPFBcNidIX56FEoE/Y2qiM94HmBIQSSYLnft86d75J1F0NLx UQdw== X-Received: by 10.194.81.67 with SMTP id y3mr5911755wjx.7.1438350513115; Fri, 31 Jul 2015 06:48:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.27.82.86 with HTTP; Fri, 31 Jul 2015 06:48:13 -0700 (PDT) From: Ashish Agarwal Date: Fri, 31 Jul 2015 09:48:13 -0400 Message-ID: To: Caml List Content-Type: multipart/alternative; boundary=047d7bdc865c65b99b051c2c137b Subject: [Caml-list] selecting GADT parameter --047d7bdc865c65b99b051c2c137b Content-Type: text/plain; charset=UTF-8 I have: type _ t = | Foo1 : 'a * int -> int t | Foo2 : 'a * string -> 'a t but I really want to merge these two cases. I want the return type to be based on the second arg when the second arg is int, and be based on the first arg otherwise. Any way to accomplish that? --047d7bdc865c65b99b051c2c137b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I have:

type _ t =3D
| Foo1 := 'a * int -> int t
| Foo2 : 'a * string -> 'a t=

but I really want to merge these two cases. I wan= t the return type to be based on the second arg when the second arg is int,= and be based on the first arg otherwise. Any way to accomplish that?
=

--047d7bdc865c65b99b051c2c137b--