From 6edd724531e89afb03761cc609f598ad5ff066d7 Mon Sep 17 00:00:00 2001 From: Edwin Brady Date: Thu, 1 Aug 2019 11:22:16 +0100 Subject: [PATCH] Update %cg directives documentation --- Notes/Directives.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Notes/Directives.md b/Notes/Directives.md index 264d2ed..299d3c9 100644 --- a/Notes/Directives.md +++ b/Notes/Directives.md @@ -109,8 +109,8 @@ Syntax: * `%cg ` * `%cg { }` -Injects the given instructions directly into the generated code for -the given backend. +The given instructions are passed directly to the code generator, to be +interpreted in a backend-specific way. Currently known backends are: `chez`, `chicken` and `racket`. @@ -139,3 +139,9 @@ corresponding file-loading code: Note the file is loaded referencing an absolute path of the first matching file found, except when it's the current directory in which case the file is simply referenced as `./library_name` + +### Chicken + +The directive should be scheme code which is inserted directly into the generated +code. This can be used, for example, to import external libraries, e.g. +`%cg chicken (use posix)`.