This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: CL implementation questions
- From: Per Bothner <per at bothner dot com>
- To: Charles Turner <chturne at gmail dot com>
- Cc: Kawa mailing list <kawa at sourceware dot org>
- Date: Tue, 03 Apr 2012 11:50:12 -0700
- Subject: Re: CL implementation questions
- References: <CAPMhJv3gH18NH61qUvMZcZUbUJjB_08x7WC-to4DuDcqZmjkhg@mail.gmail.com> <4F72B408.5020700@bothner.com> <CAPMhJv0FmBAdPQ_o2rM_koU2391CAmD_0BC22A4dZ=u_aWxoew@mail.gmail.com> <4F77D526.9000109@bothner.com> <CAPMhJv2nBDCHAEpeosstPL+SdeSEg5KuXSAMWTo=cOMxyZLwCQ@mail.gmail.com>
On 04/03/2012 10:27 AM, Charles Turner wrote:
// decls is e.g '((integer x) (gnu.lists.sequence y))
I assume you realize you also need to support: (integer x y)
The #setType and #setFlag methods seem to be all that's need to set
the type of variables with :: (cf Lambda), what am I missing here?
A Declaration has both a "type expression" (typeExp field)
and a "type (value)" (type field): The former "evaluates" to
the latter. A potential use for the "type expression" might be
run-time types (or "dependent types" as in type theory). However,
this isn't really supported. What typeExp is used for is to stash
a type that hasn't been resolved to a Type - yet.
Specifically, look for the 'instanceof LangExp' in
Lambda#rewriteBody.
In the case of declare forms in a <body> you shouldn't need to
use the LangExp - just call exp2Type directly, as in let.java.
--
--Per Bothner
per@bothner.com http://per.bothner.com/