caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Grégoire Seux" <kamaradclimber@gmail.com>
To: caml-list <caml-list@inria.fr>
Subject: define incompatible type
Date: Fri, 12 Feb 2010 12:02:45 +0530	[thread overview]
Message-ID: <1ae8fe881002112232v73a57e97le63cfd48ffac6d48@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 430 bytes --]

hello !

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

type user_id = int

type movie_id = int


i'd like if the type checker would warn me if i write something that is
non-sense:

> let a:user_id = 57 and b:movie_id = 80 in

if a=b then ...


because this is obvioulsy a mistake

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


-- 
Grégoire

[-- Attachment #2: Type: text/html, Size: 1477 bytes --]

             reply	other threads:[~2010-02-12  6:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-12  6:32 Grégoire Seux [this message]
2010-02-12  7:33 ` [Caml-list] " David Rajchenbach-Teller
2010-02-12  7:43   ` Grégoire Seux
2010-02-12 10:59   ` David Allsopp
2010-02-12 20:26     ` Guillaume Yziquel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1ae8fe881002112232v73a57e97le63cfd48ffac6d48@mail.gmail.com \
    --to=kamaradclimber@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).