From: Ethan Aubin <ethan.aubin@pobox.com>
To: caml-list@inria.fr
Subject: Re: ambitious proposal: polymorphic arithmetics
Date: Thu, 7 Apr 2005 00:01:27 +0000 (UTC) [thread overview]
Message-ID: <d31t8n$b14$1@sea.gmane.org> (raw)
In-Reply-To: <20050406185901.GA6338@furbychan.cocan.org>
Gadts can do for all sorts of cool things. For example, an approach to
simulate type classes with gadts see
http://www.cs.bu.edu/~hwxi/GRecTypecon/PAPER/main.pdf, to create a
statically typed printf see
http://www.cs.bu.edu/~hwxi/academic/papers/popl03.pdf
Hongwei Xi and Tim Sheard's papers have tons of interesting examples
in their publications. I hope some ideas from their languages, ATS and
Omega respectively, trickle down to Ocaml.
> On Wed, Apr 06, 2005 at 08:43:01PM +0400, Dmitry Lomov wrote:
>> Richard Jones wrote:
>> >The problem, I'm guessing, is that you add polymorphic +, -, and so
>> >on. But that's really just a hack in the language. Sooner or later
>> >people are going to ask why it's not possible to write a polymorphic
>> >'print' function, _without_ hacking the language some more. At that
>> >point you need a theory, and you need something like G'Caml, or type
>> >classes, or GADTS.
>>
>> Pardon my ignorance, but how are GADTs are going to help in this regard?
>> I thought GADTs are basically data types with constructors that have
>> non-uniform "return type".
> Pardon _my_ ignorance. I read something about using GADTs to simulate
> class types in the paper, and assumed that they are equivalent, but
> I'm probably wrong.
Also, sorry for any duplicate post.
next prev parent reply other threads:[~2005-04-07 0:12 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-06 15:15 Eijiro Sumii
2005-04-06 15:51 ` [Caml-list] " Sébastien Hinderer
2005-04-06 15:56 ` Richard Jones
2005-04-06 16:43 ` Dmitry Lomov
2005-04-06 18:59 ` Richard Jones
2005-04-06 19:19 ` Jacques Carette
2005-04-07 0:01 ` Ethan Aubin [this message]
2005-04-06 16:39 ` William Lovas
2005-04-06 16:59 ` Andreas Rossberg
2005-04-06 18:50 ` Eijiro Sumii
2005-04-06 19:33 ` Eijiro Sumii
2005-04-07 0:13 ` William Lovas
2005-04-07 1:58 ` Jacques Garrigue
2005-04-06 17:00 ` Christophe TROESTLER
2005-04-06 19:20 ` Eijiro Sumii
2005-04-07 14:00 ` Christophe TROESTLER
2005-04-06 17:23 ` Marcin 'Qrczak' Kowalczyk
2005-04-06 18:01 ` padiolea
2005-04-06 19:14 ` Eijiro Sumii
2005-04-06 20:31 ` Eijiro Sumii
2005-04-06 21:53 ` Marcin 'Qrczak' Kowalczyk
2005-04-06 22:38 ` Eijiro Sumii
2005-04-06 19:23 ` Richard Jones
2005-04-09 2:58 ` Jon Harrop
2005-04-09 3:16 ` Eijiro Sumii
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='d31t8n$b14$1@sea.gmane.org' \
--to=ethan.aubin@pobox.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