From: Creighton Hogg
Subject: type systems as libraries
Date: 
Message-ID: <Pine.LNX.4.58.0512291425210.13246@login01.hep.wisc.edu>
Hi guys,
Has anyone ever real heard of implementing type systems and 
type inference on top of lisp as a kindof macro library?
I'm picturing something like
(with-hindley-milner
	(rest-o-the-code))
Browsing a few pages of google search results I didn't find 
anything to promising.  Is this just a bad idea or not done 
for some particular reason?

From: Marco Antoniotti
Subject: Re: type systems as libraries
Date: 
Message-ID: <1135890342.908090.212280@f14g2000cwb.googlegroups.com>
It isn't as simple as it seems, plus you do not want a macro layer.
You want something that allows you to work seamlessly with the system.

In any case, you need a unification system to do this :) CL-UNIFICATION
in common-lisp.net is a step in that direction.

Cheers
--
marco




Creighton Hogg wrote:
> Hi guys,
> Has anyone ever real heard of implementing type systems and
> type inference on top of lisp as a kindof macro library?
> I'm picturing something like
> (with-hindley-milner
> 	(rest-o-the-code))
> Browsing a few pages of google search results I didn't find
> anything to promising.  Is this just a bad idea or not done
> for some particular reason?
From: Creighton Hogg
Subject: Re: type systems as libraries
Date: 
Message-ID: <Pine.LNX.4.58.0512291508030.13246@login01.hep.wisc.edu>
On Thu, 29 Dec 2005, Marco Antoniotti wrote:

> It isn't as simple as it seems, plus you do not want a macro layer.
> You want something that allows you to work seamlessly with the system.
> 
> In any case, you need a unification system to do this :) CL-UNIFICATION
> in common-lisp.net is a step in that direction.

Now I'm intrigued:  why wouldn't you want a macro layer?  In 
my eye it would compile into a bunch of expressions that 
call the type declarations of CL itself.  
Hrmm...is it the fact that it would compile into statements 
for the compiler that's the problem?
From: Marco Antoniotti
Subject: Re: type systems as libraries
Date: 
Message-ID: <1135953617.892617.193800@o13g2000cwo.googlegroups.com>
Well, maybe I spoke too fast.  At a certain level you will have macros,
but they should be more of the kind

  (defmacro typed-cl:defun (....) ...)

I.e. substituting the main definition forms etc. etc.

At least that is how I would set it up.

However, you still have the problems of dealing with CL type system
(which was not designed with a HM type checker in mind), with the
problem of run-time type checks and with the problem of run-time
redefinition of various things.

Cheers
--
Marco
From: dominikus
Subject: Re: type systems as libraries
Date: 
Message-ID: <1135890386.023891.24580@g49g2000cwa.googlegroups.com>
Maybe Qi (built on top of Lisp) is something for you that is worth
looking at, see

http://www.lambdassociates.org/

Dominikus
From: Creighton Hogg
Subject: Re: type systems as libraries
Date: 
Message-ID: <Pine.LNX.4.58.0512291524140.13246@login01.hep.wisc.edu>
On Thu, 29 Dec 2005, dominikus wrote:

> Maybe Qi (built on top of Lisp) is something for you that is worth
> looking at, see
> 
> http://www.lambdassociates.org/

Actually this does look pretty interesting, thanks.
I'm not sure if it's exactly what I was thinking of or not, 
but it's at least a start.
From: RPG
Subject: Re: type systems as libraries
Date: 
Message-ID: <1135914642.594493.46100@g47g2000cwa.googlegroups.com>
Drew McDermott has done this as part of his suite of Yale tools for
lisp.  Have a look at the software documentation and software tools on
his page at http://cs-www.cs.yale.edu/homes/dvm/

Cheers,
Robert
From: David Trudgett
Subject: Re: type systems as libraries
Date: 
Message-ID: <m364p7npfc.fsf@rr.trudgett>
"RPG" <·········@gmail.com> writes:

> Drew McDermott has done this as part of his suite of Yale tools for
> lisp.  Have a look at the software documentation and software tools on
> his page at http://cs-www.cs.yale.edu/homes/dvm/

Checking out a few of the pages there, I came across this one about
CL's FORMAT:

    http://cs-www.cs.yale.edu/homes/dvm/format-stinks.html

I think he has a good point there, and it seems to me that FORMAT is
extremely unlispy, even more so than loop (if such a comparison is
possible). On the other hand, I don't notice FORMAT's unlispiness
threatening to transform my Lisp programs into C evilness... so maybe
it's acceptable.

What are people's thoughts on this? Does anyone actually go out of
their way to avoid FORMAT?

David


-- 

David Trudgett
http://www.zeta.org.au/~wpower/

Fearlessness is the first requisite of spirituality. Cowards can never
be moral.

    -- Mohandas Gandhi
From: Creighton Hogg
Subject: Re: type systems as libraries
Date: 
Message-ID: <Pine.LNX.4.58.0512292341350.26279@login01.hep.wisc.edu>
On Fri, 30 Dec 2005, David Trudgett wrote:

> "RPG" <·········@gmail.com> writes:
> 
> > Drew McDermott has done this as part of his suite of Yale tools for
> > lisp.  Have a look at the software documentation and software tools on
> > his page at http://cs-www.cs.yale.edu/homes/dvm/
> 
> Checking out a few of the pages there, I came across this one about
> CL's FORMAT:
> 
>     http://cs-www.cs.yale.edu/homes/dvm/format-stinks.html
> 
> I think he has a good point there, and it seems to me that FORMAT is
> extremely unlispy, even more so than loop (if such a comparison is
> possible). On the other hand, I don't notice FORMAT's unlispiness
> threatening to transform my Lisp programs into C evilness... so maybe
> it's acceptable.
> 
> What are people's thoughts on this? Does anyone actually go out of
> their way to avoid FORMAT?

I'm pretty novice at lisp still, but format is one of those 
things I have to look up basically every time I use it.  It 
is pretty unintuitive, at least at first.
From: Ivan Boldyrev
Subject: Re: type systems as libraries
Date: 
Message-ID: <5vpe83-et7.ln1@ibhome.cgitftp.uiggm.nsc.ru>
On 9339 day of my life Creighton Hogg wrote:
> Hi guys,
> Has anyone ever real heard of implementing type systems and 
> type inference on top of lisp as a kindof macro library?
> I'm picturing something like
> (with-hindley-milner
> 	(rest-o-the-code))
> Browsing a few pages of google search results I didn't find 
> anything to promising.  Is this just a bad idea or not done 
> for some particular reason?

http://www.cliki.net/TypeL

-- 
Ivan Boldyrev

                                                  Is 'morning' a gerund?