On 2/5/13, John Cowan <[email protected]> wrote:
> Alan Manuel Gloria scripsit:
>
>> * To create an R7RS library out of a bunch of definitions in a file,
>> simply put something like the following at the top of your file; there
>> is no need to change your existing formatting of existing definitions:
>
> I don't recommend that. The better approach is to put the define-library
> form into a separate file, as is normally done in Chibi, with
> an include library-declaration in that file.
*shrug* then consider the style guide sufficiently modified to mention
R6RS library forms instead.
* To create an R6RS library out of a bunch of definitions in a file,
simply put something the following at the top of your file: there is
no need to change your existing formatting of existing definitions:
<* library \\ (your library (1 0 0))
export
your-function
rename internal:your-function external:your-function
...
import
(rnrs base (6)) ; you probably need this
...
<* begin
define your-function ...
...
* An R7RS library can be created similarly. However, the
recommendation is to leave the definitions in a separate file, and
just use R7RS include or include-ci, like so:
define-library (your library)
export
your-function
rename internal:your-function external:your-function
...
import
(scheme base)
...
include "implementation-file.scm"
--
I personally prefer keeping the library spec with the definitions,
though, so even on R7RS I'd still put the <* define-library \\ blah
form.
Sincerely,
AmkG
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Readable-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/readable-discuss