From: Philip Wadler <wadler@research.bell-labs.com>
To: types@cis.upenn.edu, categories@mta.ca
Subject: Recursive types in polymorphic lambda calculus
Date: Fri, 14 May 1999 15:24:32 -0400 [thread overview]
Message-ID: <199905141924.PAA12048__17247.0051482835$1241017585$gmane$org@nslocum.cs.bell-labs.com> (raw)
There is a fairly standard encoding of recursive types
into polymorphic lambda calculus, given by
rec X.F[X] = all X.(F[X] -> X) -> X
where F[X] is a type in which the type variable X appears only
covariantly. Recall that every covariant type corresponds to a
covariant functor, so for every h:X->Y we have F[h]:F[X]->F[Y].
If we abbreviate T = rec X.F[X], then the key functions on this
type are given by the polymorphic lambda terms:
fold : all X.(F[X] -> X) -> T -> X
fold = Lam X.lam k:F[X]->X.lam t:T.t{X}(k)
in : F[T] -> T
in = lam u:F[T].Lam X.lam k:F[X]->X.k(F[fold{X}(k)](u))
out : T -> F[T]
out = fold{F[T]}(F[in])
Questions: Who first had this insight? Where is a good place to find
this spelled out in the literature? Please send results to me, and I
will summarize them for the list. Cheers, -- P
next reply other threads:[~1999-05-14 19:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-05-14 19:24 Philip Wadler [this message]
[not found] <199905151242.IAA02714@saul.cis.upenn.edu>
1999-05-31 16:09 ` Philip Wadler
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='199905141924.PAA12048__17247.0051482835$1241017585$gmane$org@nslocum.cs.bell-labs.com' \
--to=wadler@research.bell-labs.com \
--cc=categories@mta.ca \
--cc=types@cis.upenn.edu \
/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).