|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The June 30 09e70c914ca83b5c7405aa633864db49f27efa05,
subject "op: refactor do handling", introduced a regression
breaking the tags.tl program. An implicit argument
gets inserted twice:
[[(do op list @1)] 'x] -> (x x) ;; incorrect/weird
This was spotted by Paul A. Patience while working on
extending tags.tl for Emacs.
It's not exactly a regression because the original
behavior is not documented or tested, and has issues;
we simply cannot roll back the commit; a proper
fix is required.
How the above call is now supposed to work is that:
- the @1 parameter belongs to the op, not to the do.
- the do therefore has no explicitly given parameters
of its own.
- therefore the do inserts its parameter.
In other words (do op list @1) is formally equivalent
to (do op list @1 @@1).
Both levels of function indirection require an
argument:
[[(do op list @1) 'x] 'y] -> (y x)
[[(do op list @1 @@1) 'x] 'y] -> (y x)
* stdlib/op.tl (sys:op-ctx): The structure gets a new slot,
nested, which is a flag indicating whether unprocessed nested
metas occur. This is critically needed because the
sys:op-alpha-rename passes which are called with
do-nested-metas being false do not insert nested metas into
the gens list; they transform them and leave them in the
syntax. Yet we must make decisions based on their presence.
Conretely, we must be able to tell that (do op list @@1)
has a meta against the outer (do ...), while we are just
processing the do.
(sys:op-alpha-rename): When replacing a nested meta syntax
with the macro invocation, we set the nested flag of the
parent context true.
(sys:op-expand): Bring back the do-gen; we need it. We cannot
simply insert @1 into the syntax, because that is not
lexically transparent. If we add @1 to (do op ...) then that
@1 is interpreted as belonging to the op, not to the do.
We must also check the new Boolean flag nested to properly
detect whether we have metas, including unexpanded nested
metas.
* tests/012/op.tl: New test cases combining (do op ...).
|
|
This affects run-time also. Txr installations where the
executable is not in directory ending in ${bindir}
will look for stdlib rather than share/txr/stdlib,
relative to the determined installation directory.
* txr.c (sysroot_init): If we detect relative to the short
name, or fall back on the program directory, use stdlib
rather than share/txr/stdlib as the stdlib_path.
* INSTALL: Update some installation notes not to refer to
share/txr/stdlib but stdlib.
* Makefile (STDLIB_SRCS): Refer to stdlib, not
share/txr/stdlib.
(clean): In unconfigured mode, remove the old share/txr/stdlib
entirely. Remove .tlo files from stdlib.
(install): Install lib materials from stdlib.
* txr.1: Updated documentation under Deployment Directory Structure.
* share/txr/stdlib/{asm,awk,build,cadr}.tl:
Renamed to stdlib/{asm,awk,build,cadr}.tl.
* share/txr/stdlib/{compiler,conv,copy-file,debugger}.tl:
Renamed to stdlib/{compiler,conv,copy-file,debugger}.tl.
* share/txr/stdlib/{defset,doc-lookup,doc-syms,doloop}.tl:
Renamed to stdlib/{defset,doc-lookup,doc-syms,doloop}.tl.
* share/txr/stdlib/{each-prod,error,except,ffi}.tl:
Renamed to stdlib/{each-prod,error,except,ffi}.tl.
* share/txr/stdlib/{getopts,getput,hash,ifa}.tl:
Renamed to stdlib/{getopts,getput,hash,ifa}.tl.
* share/txr/stdlib/{keyparams,match,op,optimize}.tl:
Renamed to stdlib/{keyparams,match,op,optimize}.tl.
* share/txr/stdlib/{package,param,path-test,pic}.tl:
Renamed to stdlib/{package,param,path-test,pic}.tl.
* share/txr/stdlib/{place,pmac,quips,save-exe}.tl:
Renamed to stdlib/{place,pmac,quips,save-exe}.tl.
* share/txr/stdlib/{socket,stream-wrap,struct,tagbody}.tl:
Renamed to stdlib/{socket,stream-wrap,struct,tagbody}.tl.
* share/txr/stdlib/{termios,trace,txr-case,type}.tl:
Renamed to stdlib/{termios,trace,txr-case,type}.tl.
* share/txr/stdlib/{ver,vm-param,with-resources,with-stream}.tl:
Renamed to stdlib/{ver,vm-param,with-resources,with-stream}.tl.
* share/txr/stdlib/yield.tl: Renamed to stdlib/yield.tl.
* share/txr/stdlib/{txr-case,ver}.txr:
Renamed to stdlib/{txr-case,ver}.txr.
* gencadr.txr: Update to stdlib/place.tl.
* genman.txr: Update to stdlib/cadr.tl.
|