caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Goswin von Brederlow <goswin-v-b@web.de>
To: oleg@okmij.org
Cc: goswin-v-b@web.de, caml-list@inria.fr
Subject: [Caml-list] Re: Wanted: GADT examples: string length, counting module x
Date: Thu, 22 Mar 2012 17:58:32 +0100	[thread overview]
Message-ID: <87sjh08tdz.fsf@frosties.localnet> (raw)
In-Reply-To: <20120322060157.44172.qmail@eeoth.pair.com> (oleg@okmij.org's message of "22 Mar 2012 06:01:57 -0000")

oleg@okmij.org writes:

> Somehow typed tagless interpreters (embeddings of a typed language)
> and length-parameterized lists with the append function are the most
> popular examples of GADTs. Neither of them seem to be particularly
> good or compelling examples. One can write typed interpreters in the
> final-tagless style, with no GADTs. Writing append function whose type
> says the length of the resulting list is the sum of the lengths of the
> argument lists is cute. However, this example does not go too far, as
> one discovers when trying to write List.filter for
> length-parameterized lists.
>
> The ML2010 talk on GADT emulation specifically used a different
> illustrating example: a sort of generic programming, or implementing
> N-morphic functions:
>  http://okmij.org/ftp/ML/first-class-modules/first-class-modules-talk-notes.pdf

An interesting talk to read. But unless I'm mistaken that isn't using
ocamls new GADT types but implements it own.

MfG
        Goswin

      parent reply	other threads:[~2012-03-22 16:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-22  6:01 [Caml-list] " oleg
2012-03-22  9:04 ` Gabriel Scherer
2012-03-22 16:58 ` Goswin von Brederlow [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=87sjh08tdz.fsf@frosties.localnet \
    --to=goswin-v-b@web.de \
    --cc=caml-list@inria.fr \
    --cc=oleg@okmij.org \
    /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).