Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: brogoff <brogoff@speakeasy.net>
To: Jacques GARRIGUE <garrigue@kurims.kyoto-u.ac.jp>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Re: OCaml typechecking bug? (PR#3104) [about phantom types]
Date: Thu, 26 Aug 2004 22:43:37 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0408262237090.1961@shell2.speakeasy.net> (raw)
In-Reply-To: <20040827.102827.50023947.garrigue@kurims.kyoto-u.ac.jp>

On Fri, 27 Aug 2004, Jacques GARRIGUE wrote:
[...snip...]
> Not surprising: the distinction is not between built-in and
> user-defined, but between abbreviation types and datatypes (which
> share the same syntax in ocaml, but have different syntax in most
> other dialects)
[...snip...]
> This behaviour is perfectly normal.
> In the above signature, the type t is not phantom at all.
> It will be expanded to int before checking equality, so the type
> argument will be completely ignored altogether.

OK, ignore my request for further explanation, it all makes good sense now,
even though it was counterintuitive behavior at first. It does suggest that
making a syntactic distinction between type abbreviation and datatype
definition a la SML is a good idea.

I never ran across this behavior before since I assumed the phantom type had to
be abstract and always coded it that way.

All of this phantom type stuff makes me wish we had dependent types anyways...

-- Brian

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


      parent reply	other threads:[~2004-08-27  5:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200408261703.TAA23962@pauillac.inria.fr>
2004-08-27  1:28 ` Jacques GARRIGUE
2004-08-27  5:05   ` brogoff
2004-08-27  5:43   ` brogoff [this message]

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=Pine.LNX.4.58.0408262237090.1961@shell2.speakeasy.net \
    --to=brogoff@speakeasy.net \
    --cc=caml-list@inria.fr \
    --cc=garrigue@kurims.kyoto-u.ac.jp \
    /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