SRFI-99

Check-in [294ff6295b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Corrected symbol syntax stripping behaviour in automatic identifier constructions
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:294ff6295b8afa80515b31a0ce4b9ba7994038b4
User & Date: murphy 2014-09-05 01:26:54
Context
2014-09-05
13:55
Bumped .setup version to 1.4.2 check-in: f63c445596 user: murphy tags: trunk, v1.4.2
01:26
Corrected symbol syntax stripping behaviour in automatic identifier constructions check-in: 294ff6295b user: murphy tags: trunk
2014-04-30
23:03
updated release information check-in: 18ccaedb93 user: murphy tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to srfi-99.scm.

329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
...
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
...
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
   scheme (except chicken define-record-type define-record-printer)
   srfi-99-records-procedural)

(define-syntax %define-record-constructor/default
  (ir-macro-transformer
   (lambda (stx inject id=)
     (let* ((rtd (cadr stx))
	    (name (symbol-append 'make- (inject rtd))))
       `(define-record-constructor ,rtd ,(inject name))))))

(define-syntax define-record-constructor
  (syntax-rules ()
    ((define-record-constructor rtd #f)
     (begin))
    ((define-record-constructor rtd #t)
................................................................................
     (define name
       (rtd-constructor rtd)))))

(define-syntax %define-record-predicate/default
  (ir-macro-transformer
   (lambda (stx inject id=)
     (let* ((rtd (cadr stx))
	    (name (symbol-append (inject rtd) '?)))
       `(define-record-predicate ,rtd ,(inject name))))))

(define-syntax define-record-predicate
  (syntax-rules ()
    ((define-record-predicate rtd #f)
     (begin))
    ((define-record-predicate rtd #t)
................................................................................
       (rtd-predicate rtd)))))

(define-syntax %define-record-field/mutable-default
  (ir-macro-transformer
   (lambda (stx inject id=)
     (let* ((rtd (cadr stx))
	    (name (caddr stx))
	    (accessor (symbol-append (inject rtd) '- (inject name)))
	    (mutator (symbol-append accessor '-set!)))
       `(define-record-field ,rtd (,name ,(inject accessor) ,(inject mutator)))))))

(define-syntax %define-record-field/immutable-default
  (ir-macro-transformer
   (lambda (stx inject id=)
     (let* ((rtd (cadr stx))
	    (name (caddr stx))
	    (accessor (symbol-append (inject rtd) '- (inject name))))
       `(define-record-field ,rtd (,name ,(inject accessor)))))))

(define-syntax define-record-field
  (syntax-rules ()
    ((define-record-field rtd (name accessor mutator))
     (begin
       (define accessor







|







 







|







 







|








|







329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
...
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
...
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
   scheme (except chicken define-record-type define-record-printer)
   srfi-99-records-procedural)

(define-syntax %define-record-constructor/default
  (ir-macro-transformer
   (lambda (stx inject id=)
     (let* ((rtd (cadr stx))
	    (name (symbol-append 'make- (strip-syntax rtd))))
       `(define-record-constructor ,rtd ,(inject name))))))

(define-syntax define-record-constructor
  (syntax-rules ()
    ((define-record-constructor rtd #f)
     (begin))
    ((define-record-constructor rtd #t)
................................................................................
     (define name
       (rtd-constructor rtd)))))

(define-syntax %define-record-predicate/default
  (ir-macro-transformer
   (lambda (stx inject id=)
     (let* ((rtd (cadr stx))
	    (name (symbol-append (strip-syntax rtd) '?)))
       `(define-record-predicate ,rtd ,(inject name))))))

(define-syntax define-record-predicate
  (syntax-rules ()
    ((define-record-predicate rtd #f)
     (begin))
    ((define-record-predicate rtd #t)
................................................................................
       (rtd-predicate rtd)))))

(define-syntax %define-record-field/mutable-default
  (ir-macro-transformer
   (lambda (stx inject id=)
     (let* ((rtd (cadr stx))
	    (name (caddr stx))
	    (accessor (symbol-append (strip-syntax rtd) '- (strip-syntax name)))
	    (mutator (symbol-append accessor '-set!)))
       `(define-record-field ,rtd (,name ,(inject accessor) ,(inject mutator)))))))

(define-syntax %define-record-field/immutable-default
  (ir-macro-transformer
   (lambda (stx inject id=)
     (let* ((rtd (cadr stx))
	    (name (caddr stx))
	    (accessor (symbol-append (strip-syntax rtd) '- (strip-syntax name))))
       `(define-record-field ,rtd (,name ,(inject accessor)))))))

(define-syntax define-record-field
  (syntax-rules ()
    ((define-record-field rtd (name accessor mutator))
     (begin
       (define accessor