Changeset 39581 in project


Ignore:
Timestamp:
02/06/21 17:42:00 (3 weeks ago)
Author:
juergen
Message:

premodules 0.7 docu with restricted exports

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/5/premodules

    r39563 r39581  
    1010premodules, which differ from modules insofar, that there is
    1111
    12 - no license
    13 - no export-clause
    14 - no documentation routine
     12* no license
     13* no export-clause
     14* no documentation routine
    1515
    1616Instead, those texts are inserted automatically into the final module
     
    2626A standardized routine comment looks like this
    2727
     28<enscript highlight=scheme>
    2829  #|[
    2930  (name . args)
     
    3334  ...
    3435  ]|#
    35 
    36 where type is one of procedure, macro or parameter and is enclosed in at
    37 least three hyphens on each side
     36</enscript>
     37
     38where type is one of
     39
     40* procedure
     41* macro
     42* parameter
     43
     44and is enclosed in at least three hyphens on each side.
     45
     46If type is macro, it can be followed by symbols representing restricted
     47exports of helpers only needed in that macro, e.g.
     48
     49--- macro *foo* bar ---
     50
     51This will create an export clause (name *foo* bar) instead of name.
    3852
    3953Note, that this comment is placed immediately before the routine's
     
    6276
    6377Off course, the generated tests depend on the test suite used. It's
    64 obvious, that I use my own one, either simple-tests or simple-checks.
    65 So, exported tests are implemented either with define-checks from the
    66 simple-tests module or with define-checker from the simple-checks
    67 module, the latter being prefered. Internal tests are coded with one of
    68 pe, check or the ppp macros.
     78obvious, that I use my own one, simple-tests.  So, exported tests are
     79implemented with define-tester from simple-tests and will be collected
     80and executed by test-all in the generated code.
     81
     82Internal tests are coded with one of pe, check or ppp and will be
     83ignored in the generated code..
    6984
    7085Exported tests go into the automatically generated run.scm and the
     
    163178             (loop (+ i 1))))))))
    164179
     180(define foo 'foo) ; example of restricted export
     181
    165182#|[
    166183(do-list i lst xpr ....)
    167 --- macro ---
     184--- macro foo ---
    168185execute xpr .... for i in lst
    169186]|#
     
    263280
    264281;; to be exported
    265 (define-checks (dos verbose?)
     282(define-tester (dos?)
    266283
    267284  (let ((lst '()))
     
    316333<enscript highligth=scheme>
    317334
     335(import premodules)
    318336(premodule->module "preloops.scm" "loops.scm")
    319337(premodule->tests "preloops.scm" "run.scm")
     
    336354== Requirements
    337355
    338 simple-tests or simple-checks
     356simple-tests
    339357
    340358== Last update
    341359
    342 Jan 27, 2021
     360Feb 06, 2021
    343361
    344362== Author
     
    378396
    379397== Version history
     398; 0.7 : support for restricted exports of macro helpers added
    380399; 0.6.1 : support for define-tester and test-all added
    381400; 0.5 : history, license and local docu updated, Makefile added
Note: See TracChangeset for help on using the changeset viewer.