summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2017-11-18 18:29:11 -0500
committerOwen Jacobson <owen@grimoire.ca>2017-11-18 18:29:11 -0500
commita6dcdcad4fd8407cbd67fb1c2d293f0d3be88914 (patch)
treebdacc6cc67b9b454405434f829bfd9992ecd7419 /README.rst
parent8d289bffdd2bf2062a6677530c4a4226175d87b2 (diff)
Macro-binding glue, and a let macro
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst8
1 files changed, 7 insertions, 1 deletions
diff --git a/README.rst b/README.rst
index 2b1bfcc..0301b24 100644
--- a/README.rst
+++ b/README.rst
@@ -174,7 +174,10 @@ layer to map Python return values to Actinide value lists. The ``bind_void``
helper ultimately calls that module's ``wrap_void`` to wrap the function, and
``bind_fn`` calls ``wrap_fn``. (Tuple-returning functions do not need to be
wrapped.) If you prefer to manually bind functions using ``bind``, they must be
-wrapped appropriately.
+wrapped appropriately. An equivalent set of methods, ``macro_bind``,
+``macro_bind_void``, ``macro_bind_fn``, and ``macro_bind_builtin`` bind values
+to entries in the top-level macro table, instead of the top-level environment,
+and allow extension of the language's syntax.
Finally, Actinide can bind specially-crafted Python modules. If a module
contains a top-level symbol named ``An`` (for the informal chemical symbol for
@@ -201,6 +204,9 @@ The symbol must be bound to an instance of the ``Registry`` class from the
def two_values():
return 1, "Two"
+ # @An.macro_bind, @An.macro_void, @An.macro_fn, and @An.macro_builtin follow
+ # the same pattern.
+
Going the other direction, values can be extracted from bindings in the session
using the ``get`` method: