From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id A83E6BC57 for ; Sat, 4 Sep 2010 08:40:19 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsBANqGgUzRVdg2kGdsb2JhbACBRJ9PCBUBAQEBCQkMBxEDH6E8iTOCFYYYLog4AQEDBYU2BIoW X-IronPort-AV: E=Sophos;i="4.56,317,1280700000"; d="scan'208";a="68848593" Received: from mail-qw0-f54.google.com ([209.85.216.54]) by mail4-smtp-sop.national.inria.fr with ESMTP; 04 Sep 2010 08:40:19 +0200 Received: by qwg5 with SMTP id 5so3160689qwg.27 for ; Fri, 03 Sep 2010 23:40:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=F7e+Xgx99Tp7naDuvIiSZegGNGjjW4S00+o4wsy8Qy4=; b=YJeCmdbTBSvhQbKlZVEKOowTYB5q5TtNns/twTSVzh3WUHxRiJ6D4GbwsmHqxgSk33 KlqaBcXywTEJdjtgZ6ZFYkyxg3KCnmLHoNAT77+qnz+pieOSFUFSAoQn68QttG17TlpF rP7pB8nxg1wA2HmkyLyIf5y/jGuPbFxBgXwMg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=NbZpYI6dK94AAbuW6oTaxhXejdiAQ1P9Y1Flv/0KrzpjPV6grY8HGB9VXtci1L7/q5 GPkUALsSMh8uDwI3Ej4XGpB90LcD9ZJL9rVk78/PpH3rhbwAgk0Xtw4UQF/bqG2g8+8B 9qBk65UDOG7Actsm2/rVfVLt7VzXIVLFoq6+8= MIME-Version: 1.0 Received: by 10.229.228.146 with SMTP id je18mr1639765qcb.13.1283582418279; Fri, 03 Sep 2010 23:40:18 -0700 (PDT) Received: by 10.229.246.146 with HTTP; Fri, 3 Sep 2010 23:40:18 -0700 (PDT) In-Reply-To: References: Date: Sat, 4 Sep 2010 08:40:18 +0200 Message-ID: Subject: Re: [Caml-list] Create a constraint between variant type and data list From: Julien Signoles To: Sylvain Le Gall Cc: caml-list@inria.fr Content-Type: multipart/alternative; boundary=0016363b84ac14df06048f695237 X-Spam: no; 0.00; signoles:01 signoles:01 lgpl:01 constructors:01 lgpl:01 constructors:01 W8:98 z-index:98 margin-top:98 line-height:98 W6:98 gpl:01 gpl:01 font-size:98 inline:01 --0016363b84ac14df06048f695237 Content-Type: text/plain; charset=ISO-8859-1 let () = match GPL with > | GPL | LGPL -> > assert > (let s = "Do not forget to add new constructors to the data list > above." in > Format.ifprintf Format.std_formatter "%s" s; > true) > Sorry could be much better like this: let () = match GPL with GPL | LGPL -> ignore "Do not forget to add new constructors to the data list above." -- Julien --0016363b84ac14df06048f695237 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable let () =3D match GPL with
=A0 | GPL | LGPL ->
=A0=A0=A0=A0 assert
=A0=A0=A0=A0=A0=A0 (let s =3D "Do not forget to add new constructors t= o the data=20 list above." in
=A0=A0=A0=A0=A0=A0=A0=A0Format.ifprintf Format.std_formatter "%s"= s;
=A0=A0=A0=A0=A0=A0=A0 true)

So= rry could be much better like this:

let () =3D match GPL with GPL | = LGPL ->
=A0 ignore "Do not forget to add new constructors to the= data=20 list above."

--
Julien
--0016363b84ac14df06048f695237--