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 69EFE7EC6E for ; Thu, 19 Dec 2013 23:18:03 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of lukstafi@gmail.com) identity=pra; client-ip=74.125.82.51; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="lukstafi@gmail.com"; x-sender="lukstafi@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of lukstafi@gmail.com designates 74.125.82.51 as permitted sender) identity=mailfrom; client-ip=74.125.82.51; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="lukstafi@gmail.com"; x-sender="lukstafi@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-wg0-f51.google.com) identity=helo; client-ip=74.125.82.51; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="lukstafi@gmail.com"; x-sender="postmaster@mail-wg0-f51.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqICAAxws1JKfVIzlGdsb2JhbABZhBiDA7c5CBYOAQEBAQcLCwkSKoIcHhUEGQEbCRUDEgMFAQc3AiQBEQEFASKIAgEDEZVzjFyDBowHU4MJjgkKGScNZIYYEQEFDJF7gUgEmBaQJxgphFg7 X-IPAS-Result: AqICAAxws1JKfVIzlGdsb2JhbABZhBiDA7c5CBYOAQEBAQcLCwkSKoIcHhUEGQEbCRUDEgMFAQc3AiQBEQEFASKIAgEDEZVzjFyDBowHU4MJjgkKGScNZIYYEQEFDJF7gUgEmBaQJxgphFg7 X-IronPort-AV: E=Sophos;i="4.95,515,1384297200"; d="scan'208";a="49781714" Received: from mail-wg0-f51.google.com ([74.125.82.51]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 19 Dec 2013 23:18:03 +0100 Received: by mail-wg0-f51.google.com with SMTP id b13so1694507wgh.6 for ; Thu, 19 Dec 2013 14:18:02 -0800 (PST) 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=Ck23GgBGRHEipSkhbSi3Sb96je+xQowTQ9ZvZ0HOac8=; b=YXdkoQmpiPekow2H448HISJauP/Og9X6nNIDptn8SGcBddpeTuhm0IBODMbFnK1tTJ XW5YbVBgMIevZxDYubaXrkMP5RHb8vv7ZA73Q3mKp9ozzIWpAOw329G5hz0/8TpXLfbg ufR+PcDRQYfJas823Og/4XxlLw62z3wN0/7EaRXg+w07TAUEatn1zh+q/2+ZLIZZLo3b SW7pBxsUtWGmIC55rIpzuRTY5IDvone/Yxbqm8RzqgYRPQb5P5EBW6sOCZg9ZDQSk1EW zOmsUtiVJo4I6vEfvHXh5xXhhAPM1A36fbZE0m6DtEwA7eaAS8dhh+fl+RAuE3bfGT6q Jjfg== X-Received: by 10.180.205.205 with SMTP id li13mr5160907wic.12.1387491482664; Thu, 19 Dec 2013 14:18:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.227.36.201 with HTTP; Thu, 19 Dec 2013 14:17:42 -0800 (PST) From: Lukasz Stafiniak Date: Thu, 19 Dec 2013 23:17:42 +0100 Message-ID: To: Caml Content-Type: multipart/alternative; boundary=001a11c25a9ef4070e04edea88a3 Subject: [Caml-list] GADT definition --001a11c25a9ef4070e04edea88a3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, This is just a test so I'm not much concerned, but I have these definitions: type z type _ s type (_, _, _) balance =3D | Less : (*=E2=88=80'a.*) ('a, 'a s, 'a s) balance | Same : (*=E2=88=80'b.*) ('b, 'b, 'b) balance | More : (*=E2=88=80'a.*) ('a s, 'a, 'a s) balance type _ aVL =3D | Leaf : z aVL | Node : (*=E2=88=80'a, 'b, 'c.*)('a, 'b, 'c) balance * 'a aVL * int * 'b= aVL -> ('c s) aVL and I get the error for "type _ aVL =3D": Error: In this definition, a type variable cannot be deduced from the type parameters. What to do? Regards, =C5=81ukasz "lukstafi" --001a11c25a9ef4070e04edea88a3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

This is just a test so I'm not = much concerned, but I have these definitions:

type z
type _ s
type (_, _, _) balance =3D
= =C2=A0 | Less : (*=E2=88=80'a.*) ('a, 'a s, 'a s) balance
=C2=A0 | Same : (*=E2=88=80'b.*) ('b, 'b, 'b) balance<= /div>
=C2=A0 | More : (*=E2=88=80'a.*) ('a s, 'a, 'a s)= balance
type _ aVL =3D
=C2=A0 | Leaf : z aVL
=C2=A0 | Node : (*=E2=88=80'a, 'b, 'c.*)('a, 'b, '= c) balance * 'a aVL * int * 'b aVL ->
=C2=A0 =C2=A0 ('c s) aVL

and I get = the error for "type _ aVL =3D":

Err= or: In this definition, a type variable cannot be deduced
=C2=A0 = =C2=A0 =C2=A0 =C2=A0from the type parameters.

What to do?

Regards,
=C5=81ukasz "lukstafi"
--001a11c25a9ef4070e04edea88a3--