Changeset 14457 in project


Ignore:
Timestamp:
04/26/09 19:29:45 (11 years ago)
Author:
sjamaan
Message:

Add a limitations and caveats section describing the difficulties one may encounter when using s48-modules

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/s48-modules

    r14455 r14457  
    2525on how to use these, see
    2626[[http://s48.org/1.8/manual/manual-Z-H-5.html|the Scheme48 manual]].
     27
     28=== Limitations and caveats
     29
     30This module system only generates import statements.  Libraries are
     31not loaded by import statements.  This means you will have to load the
     32libraries exporting the modules yourself prior to using the s48
     33modules.
     34
     35The following code actually defines ''two'' modules; {{foo}} and {{_foo}}:
     36
     37<enscript highlight=scheme>
     38(define-structure foo (export bar)
     39  (open scheme)
     40  (files foo))
     41</enscript>
     42
     43That's because {{define-structure}} internally expands to
     44{{define-structures}} with only one structure defined.  Generating
     45several modules with differing export lists requires one common
     46internal module holding the actual code, which exports all its
     47symbols. If you have several modules defined, the name of the internal
     48module is equal to the first in the list, prefixed by an underscore.
     49If you ask Chicken to generate import libraries while compiling, don't
     50forget to add an extra {{-j}} flag to generate the "hidden" import
     51library, as well.
    2752
    2853=== Changelog
Note: See TracChangeset for help on using the changeset viewer.