1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-11 13:55:55 +03:00
mal/impls/lib
2021-05-31 10:28:04 -05:00
..
alias-hacks.mal Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
benchmark.mal [java-truffle] benchmarking and write-up 2021-05-31 10:28:04 -05:00
equality.mal Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
load-file-once.mal Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
memoize.mal Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
perf.mal Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
pprint.mal Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
protocols.mal Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
README.md Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
reducers.mal Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
test_cascade.mal Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
threading.mal Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
trivial.mal Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00

This directory contains general-purpose reusable code that does not fit in the process.

The split in small files is motivated by implementations too limited to load a single big file, but MAL has no proper module management.

However, here are some guidelines.

  • Begin with an one-line ;; short description

  • Describe the restrictions on each parameter in comments.

  • Define private symbols in hidden environments when possible. If this is not possible, for example for macros, give them a name starting with an underscore.

If a module provides tests, you may run against an implementation IMPL with these commands.

make IMPL^stepA
cd tests
python ../runtest.py lib/MODULE.mal ../IMPL/run

Users and implementors should use the following syntax in order to ensure that the same file is only loaded once.

(load-file      "../lib/load-file-once.mal")
(load-file-once "../lib/foo.mal")
(load-file-once "../lib/bar.mal")