Re: First go at inferring type

Ralf Juengling <[email protected]> Mon, 27 Mar 2006 22:27:30 -0800 (PST)
Newsgroups gmane.lisp.lush.devel
Message-ID <[email protected]>
Hi Yuri,

I just started looking at it.

So the 't' in a type signature stands for an unknown *t*ype, rather
than *t*rue, right? Maybe another symbol would be better here to
avoid possible confusion.

Pretty cool that it already works for things like the mapcar-onelist
example. You have probably thought about this already: the inferred
type could be a little more general. You get (I substitute 'a' for 't')
(-fn- (-list- a) ((-fn- a a) (-list- a)))
whereas the result could be
(-fn- (-list- b) ((-fn- b a) (-list- a))).

btw, is there any good reason to have all the type keywords surrounded
by dashes? why not simply write (fn (list b) ((fn b a) (list a)))?

ralf


On Sun, 26 Mar 2006, Yury Sulsky wrote:

> Hi all,
>
> If anyone's curious, here's my first attempt at a type inferrer for
> lush. It's not finished -- some primitives aren't handled, and it
> doesn't build dependency info, but it mostly works (there's some test
> code in "types.lsh")
>
> Yury
>


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642