You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 13, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+24-7Lines changed: 24 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,28 @@ The simple thing that should be easy is providing a generalised version of `dest
5
5
6
6
`dsm`'s whole purpose in life is to allow you to pattern match against *source code*: it does not, for instance, support matching against instances of general classes, because instances of general classes do not occur in source code. It is a tool to make doing what Lisp does best easier: implementing programming languages built on Lisp. *And that is all it does.* Because this is all it is meant to do,`dsm` cares about correctness, but it does not care at all about performance: the performance of macroexpansion never matters[^2].
As an example, let's consider a macro where there are a few possible variations on the syntax:
10
32
@@ -271,12 +293,7 @@ Declarations are 'raised' to where they belong by the compiler, so something lik
271
293
272
294
Will do the right thing, and the guard clause will be within the scope of the declaration.
273
295
274
-
The system *attempts* to deal with the short form of type declarations properly. This is hard in CL because there is no predicate which tells you whether something is a valid type specifier or not. It tries to solve this problem two ways:
275
-
276
-
- anything of the form `(declare (<x> <v> ...))` where `<x>` is *not* a symbol and all the `<v>`s are variable names is a type declaration, as declaration specifiers need to be symbols;
277
-
- for anything of the form `(declare (<s> <v> ...))` where `<s>` is a symbol and the `<v>`s are variable names it relies (indirectly) on catching an error from `(subtypep <s> t <env>)` where `<env>` is the lexical environment object.
278
-
279
-
The assumption behind the second case is that any valid type specifier should be a recognizable subtype of `t`.
296
+
The system should now deal with the short form of type declarations properly. This is hard in CL because there is no predicate which tells you whether something is a valid type specifier or not. It now works by using `canonicalize-declaration-specifier` which should reliably deal with these.
280
297
281
298
However, if you want to declare types, just use the long form[^7].
282
299
@@ -365,7 +382,7 @@ What constitutes a blank variable is parameterized internally and could be made
365
382
## Package, module, feature, dependencies
366
383
`dsm` lives in `org.tfeb.dsm` and provides `:org.tfeb.dsm`. The extension package is `org.tfeb.dsm/extensions`. There is an ASDF system definition for both it and its tests.
367
384
368
-
`dsm` depends on a fair number of other things I have written: if you have a recent Quicklisp distribution then it *should* know about all of them. At least, by the time `dsm` makes it into Quicklisp it should. If not, you need at least version 5 of [my CL hax](https://tfeb.github.io/tfeb-lisp-hax/"TFEB.ORG Lisp hax"), and at least version 8 of [my CL tools](https://tfeb.github.io/tfeb-lisp-tools/"TFEB.ORG Lisp tools").
385
+
`dsm` depends on a fair number of other things I have written: if you have a recent Quicklisp distribution then it *should* know about all of them. At least, by the time `dsm` makes it into Quicklisp it should. If not, you need at least version 9 of [my CL hax](https://tfeb.github.io/tfeb-lisp-hax/"TFEB.ORG Lisp hax"), and at least version 8 of [my CL tools](https://tfeb.github.io/tfeb-lisp-tools/"TFEB.ORG Lisp tools").
0 commit comments