Subject: Re: Three questions about type specifications
From: Erik Naggum <erik@naggum.net>
Date: Sat, 18 Aug 2001 20:06:38 GMT
Newsgroups: comp.lang.lisp
Message-ID: <3207153995704416@naggum.net>

* fitzgerald@inetmi.com (Will Fitzgerald)
> 1. Is there a Common Lisp function that will determine whether a type
> specification is valid? (i.e., (integer * 10) is valid, but (integer *
> foo) isn't).

  compile and compile-file come to mind.

> 2. Is there a way to recover the expansions of DEFTYPEs? Sort of a
> macroexpand for type specifications? (That is, if I do (deftype mymod (n)
> `(integer 0 (,n))) is there a way to go from (MYMOD 4) -> (INTEGER 0 4)?

  After you have done this, what will you do?  It appears to that you are
  looking for some functionality that can query the type, much like Ada's
  fairly elaborate <type>'<property> concept.  Is that what you really want?

///