shithub: martian9

ref: 6a277f5b5fd8b91b71aba6352118f004b1f4fc3a
dir: /notes.org/

View raw version
* First things:
** TODO Remove kw_macro
We determine what's a macro based on "syntax-rules" (so we need to make sure that's always there)
** DONE (let) doesn't work at all
** Should (let) include an implicit (begin)?
s9fes seems to do it
** TODO need an "unspecified" type?
** TODO (display) should return unspecified
** TODO implement (pair)
Pairs should be preserved, I think
Also, it should _only_ be pairs, nothing more.
** TODO (define) needs to support function definitions
Right now you need to use lambda
** DONE (cons) doesn't work
This appears to work, now, but not with a pair
* Read
** macro "transformers" should be "clauses"
Which themselves consist of "pattern" -> "template"
** DONE "quote" and "quasiquote" symbols not supported
The shortcuts work, but not the keywords
** TODO switch "define-syntax" to "let-syntax" format
I think 'let-syntax' is the better building block
* Eval
* Print
* Things to watch for
** fold-case directives (2.1)
They affect the port for all remaining activity on that port.
** bar identifiers (2.2)
How do they work? |some id|?
** yet another comment? (2.2)
How to handle #;
* Macro expansion
** Workflow
- Take pattern
- substitute args for non-literals (in order)
- compare result with ast - if it's a match, return a lamba with the matching args and the transformer
...but what about ellipsis??