From: Dawid Toton <d0@wp.pl>
To: caml-list <caml-list@yquem.inria.fr>
Subject: Re: Binding and evaluation order in module/type/value languages
Date: Fri, 21 May 2010 18:00:37 +0200 [thread overview]
Message-ID: <4BF6AE25.2040901@wp.pl> (raw)
In-Reply-To: <20100518.123313.173589671.garrigue@math.nagoya-u.ac.jp>
> It is not clear that this will work at all.
> The semantics of ocaml (contrary to SML) is not defined in terms of
> type generativity.
>
>
This is great eureka to me.
I thought that when the compiler refuses to unify some types it knows
that they are incompatible (as the error message says).
But now I think (as I currently understand non-generativity) that
sometimes the compiler simply doesn't know if some types are equal and
avoids unification of such types. The error message should be instead:
"Cannot unify the following types, because I don't have any proof that
they are equal (and I don't have looked for the proof really hard)..."
So in order to have not unifiable phantom types one has to kind of trick
the compiler and hide the fact that they are equal.
Dawid
next prev parent reply other threads:[~2010-05-21 16:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-17 19:20 Dawid Toton
2010-05-18 3:33 ` [Caml-list] " Jacques Garrigue
2010-05-21 16:00 ` Dawid Toton [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-05-17 19:18 Dawid Toton
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=4BF6AE25.2040901@wp.pl \
--to=d0@wp.pl \
--cc=caml-list@yquem.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