This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: CL implementation questions


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]