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 7FC5DBC37 for ; Fri, 12 Feb 2010 07:32:46 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq4CAHKEdEtIDtybi2dsb2JhbACDBY4eiVUIFQEBAQoLCgcRBSCvKC6BSYRfiHIBAQMFgk6BKVsEgxE X-IronPort-AV: E=Sophos;i="4.49,458,1262559600"; d="scan'208";a="56914211" Received: from fg-out-1718.google.com ([72.14.220.155]) by mail4-smtp-sop.national.inria.fr with ESMTP; 12 Feb 2010 07:32:46 +0100 Received: by fg-out-1718.google.com with SMTP id 16so70676fgg.9 for ; Thu, 11 Feb 2010 22:32:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=WhivQO1U0kIIjFt8EVQnfE7kZWxpBqVPvJA2pSSs1v8=; b=In+d2NpgOaWLOgNJ2kCwboFIi6OvrDGHIK09l686mOjz3czH29HCrua/gfn/H5/Epv vfj1fif9x3qgx0NSh5yxS25jLw/VB2Gl1xPqucxgmGrKUqUuMI3eSEdpVOiwynRrIlXt gsuQeZaqbEwi7oHZcZDsmxl3ojnTgxLpc6VnY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=PXXjtBJZjUMpGmHERQYoDgcEbpAuQxDd64E9UVjp0tAKTgZ1mZVT3Mg8KeYD8glkIC js3xrxgeGO6A+/yYKJjrGoGRo/ZJPOj2OUvQxcvvuCtZxsrlChhsSIcgB7GCPMPhgHDq WMDENKXf+knkK3RlV0HCJ3CQGNB61RXYbWzD8= MIME-Version: 1.0 Received: by 10.239.187.146 with SMTP id l18mr107306hbh.29.1265956365426; Thu, 11 Feb 2010 22:32:45 -0800 (PST) Date: Fri, 12 Feb 2010 12:02:45 +0530 Message-ID: <1ae8fe881002112232v73a57e97le63cfd48ffac6d48@mail.gmail.com> Subject: define incompatible type From: =?UTF-8?Q?Gr=C3=A9goire_Seux?= To: caml-list Content-Type: multipart/alternative; boundary=001485f6c706765f7b047f616f3d X-Spam: no; 0.00; checker:01 checker:01 gregoire:01 incompatible:01 int:01 int:01 define:02 movie:96 movie:96 let:03 let:03 types:05 types:05 i'd:06 i'd:06 X-Attachments: cset="UTF-8" cset="UTF-8" --001485f6c706765f7b047f616f3d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable hello ! i would like to create two types and use the type checker to verify the "meaning" of my programs: type user_id =3D int type movie_id =3D int i'd like if the type checker would warn me if i write something that is non-sense: > let a:user_id =3D 57 and b:movie_id =3D 80 in if a=3Db then ... because this is obvioulsy a mistake do you know if is this possible ? thanks by advance ! --=20 Gr=C3=A9goire --001485f6c706765f7b047f616f3d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable hello !

i would like to create two types and use the typ= e checker to verify the "meaning" of my programs:

<= /div>
type user_id =3D int
type movie_id =3D int

i'd like if the t= ype checker would warn me if i write something that is non-sense:
let a:user_id =3D 57 and b:movie_id =3D 80 in
if a=3Db then ...
=C2=A0
because this is obvioul= sy a mistake

do you know if is this possible ?
thanks by advance !


--
G= r=C3=A9goire
--001485f6c706765f7b047f616f3d--