Changeset 10804 in project


Ignore:
Timestamp:
05/13/08 08:26:28 (12 years ago)
Author:
felix winkelmann
Message:

added csi module, some doc fixes

Location:
chicken/branches/hygienic
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • chicken/branches/hygienic/TODO

    r10788 r10804  
    1313* test
    1414** reexports
    15 ** compiled import libs
    1615** syntax-export of srfi-14 module
    1716** hiding of non-exported module vars in compiler
     
    2827*** redefinition of imported id
    2928*** reimport of imported id
    30 ** hide unexported module definitions
    3129
    3230* update manual/NEWS
  • chicken/branches/hygienic/defaults.make

    r10788 r10804  
    296296CHICKEN_BUG_PROGRAM = $(PROGRAM_PREFIX)chicken-bug$(PROGRAM_SUFFIX)
    297297IMPORT_LIBRARIES = chicken lolevel srfi-1 srfi-4 data-structures posix srfi-13 srfi-69 extras \
    298         regex srfi-14 tcp foreign scheme srfi-18 utils
     298        regex srfi-14 tcp foreign scheme srfi-18 utils csi
    299299
    300300ifdef STATICBUILD
  • chicken/branches/hygienic/manual/Non-standard macros and special forms

    r10381 r10804  
    375375=== Record structures
    376376
    377 ==== define-record
    378 
    379  [syntax] (define-record NAME SLOTNAME ...)
    380 
    381 Defines a record type. Call {{make-NAME}} to create an instance
    382 of the structure (with one initialization-argument for each slot).
    383 {{(NAME? STRUCT)}} tests any object for being an instance of this
    384 structure.  Slots are accessed via {{(NAME-SLOTNAME STRUCT)}}
    385 and updated using {{(NAME-SLOTNAME-set!}} {{STRUCT}} {{VALUE)}}.
    386 
    387 <enscript highlight=scheme>
    388 (define-record point x y)
    389 (define p1 (make-point 123 456))
    390 (point? p1)                      ==> #t
    391 (point-x p1)                     ==> 123
    392 (point-y-set! p1 99)
    393 (point-y p1)                     ==> 99
    394 </enscript>
     377==== define-record-type
     378
     379 [syntax] (define-record-type NAME
     380                              (CONSTRUCTOR TAG ...)
     381                              PREDICATE
     382                              (FIELD ACCESSOR [MODIFIER]) ...)
     383
     384SRFI-9 record types. For more information see the documentation for
     385[[http://srfi.schemers.org/srfi-9/srfi-9.html|SRFI-9]].
     386
    395387
    396388==== define-record-printer
     
    406398
    407399<enscript highlight=scheme>
    408 (define-record foo x y z)
     400(define-record-type foo (make-foo x y z) foo?
     401  (x foo-x)
     402  (y foo-y)
     403  (z foo-z))
    409404(define f (make-foo 1 2 3))
    410405(define-record-printer (foo x out)
     
    419414</enscript>
    420415
    421 {{define-record-printer}} works also with SRFI-9 record types.
    422 
    423 ==== define-record-type
    424 
    425  [syntax] (define-record-type NAME
    426                               (CONSTRUCTOR TAG ...)
    427                               PREDICATE
    428                               (FIELD ACCESSOR [MODIFIER]) ...)
    429 
    430 SRFI-9 record types. For more information see the documentation for
    431 [[http://srfi.schemers.org/srfi-9/srfi-9.html|SRFI-9]].
    432 
    433 
    434416=== Other forms
    435417
  • chicken/branches/hygienic/manual/Unit lolevel

    r5945 r10804  
    554554
    555555<enscript highlight=scheme>
    556 (define-record point x y)
     556(define-record-type point (make-point x y) point?
     557  (x point-x point-x-set!)
     558  (y point-y point-y-set!))
    557559</enscript>
    558560
  • chicken/branches/hygienic/manual/Using the interpreter

    r10788 r10804  
    209209textual description of the object to the passed output-port. For example:
    210210
    211  #;1> (define-record point x y)
     211 #;1> (define-record-type point (make-point x y) point?
     212        (x point-x)
     213        (y point-y))
    212214 #;2> (set-describer! 'point
    213215        (lambda (pt o)
  • chicken/branches/hygienic/rules.make

    r10788 r10804  
    403403
    404404scheme.import$(O): scheme.import.c chicken.h $(CHICKEN_CONFIG_H)
     405        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) -DC_SHARED \
     406          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
     407          $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
     408csi.import$(O): csi.import.c chicken.h $(CHICKEN_CONFIG_H)
    405409        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) -DC_SHARED \
    406410          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
     
    918922        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/foreign.import.so
    919923        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/scheme.import.so
     924        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/csi.import.so
    920925        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/srfi-18.import.so
    921926        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/utils.import.so
     
    10881093scheme.import.c: scheme.import.scm
    10891094        $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@
     1095csi.import.c: csi.import.scm
     1096        $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@
    10901097srfi-18.import.c: srfi-18.import.scm
    10911098        $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@
Note: See TracChangeset for help on using the changeset viewer.