Changeset 34866 in project


Ignore:
Timestamp:
11/05/17 21:27:42 (4 years ago)
Author:
Kon Lovett
Message:

define:-record-type st

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/dsssl-utils/trunk/typed-define.scm

    r34791 r34866  
    55
    66(;export
     7  define:-record-type
    78  define:
    89)
     
    1213;; typed scheme
    1314
     15(define-syntax define:-record-type
     16  (syntax-rules ()
     17    ((_ ?tag (?ctor-id ?ctor-args ...) ?pred-id ?feld-specs ...)
     18      (begin
     19        (: ?ctor-id (#!rest --> (struct ?tag)))
     20        (: ?pred-id (* --> boolean))
     21        ;build type-dict from ?ctor-args ...
     22        (define-record-type ?tag
     23          (?ctor-id ?ctor-args ...)
     24          ?pred-id
     25          ?feld-specs ...) ) ) ) )
     26
    1427(define-syntax define:
    15   (syntax-rules (-> -->)
     28  (syntax-rules (-> --> #!optional #!rest #!key)
    1629    ;
    1730    ;Pure
Note: See TracChangeset for help on using the changeset viewer.