Ignore:
Timestamp:
02/25/08 16:11:05 (12 years ago)
Author:
Kon Lovett
Message:

Save.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/3/F-operator/tests/F-operator-test.scm

    r5067 r8904  
    33
    44(use testbase testbase-output-human)
    5 (use shift-reset bshift-breset gshift-greset reflect-reify)
     5(use shift-reset bshift-breset gshift-greset reflect-reify range)
    66(use srfi-1)
    77
     
    3636    (/ 1 x) ) )
    3737
    38 (cond-expand [hygienic-macros
    39 
    40 ;; Generalized shift/reset implementations of some control operators
    41 
    42 (define-syntax prompt
    43   (syntax-rules ()
    44     [(_ e) (greset hr-stop e)]
    45   ))
    46 
    47 (define-syntax control
    48   (syntax-rules ()
    49     [(_ f e) (gshift hs-prop f e)]
    50   ))
    51 
    52 (define-syntax prompt0
    53   (syntax-rules ()
    54     [(_ e) (greset hr-prop e)]
    55   ))
    56 
    57 (define-syntax shift0
    58   (syntax-rules ()
    59     [(_ f e) (gshift hs-stop f e)]
    60   ))
    61 
    62 ][else
    63 
    64 ;; Generalized shift/reset implementations of some control operators
    65 
    66 (define-macro (prompt E)
    67   `(greset hr-stop ,E) )
    68 
    69 (define-macro (control F E)
    70   `(gshift hs-prop ,F ,E) )
    71 
    72 (define-macro (prompt0 E)
    73   `(greset hr-prop ,E) )
    74 
    75 (define-macro (shift0 F E)
    76   `(gshift hs-stop ,F ,E) )
    77 
    78 ])
    79 
    80 ;;
     38(cond-expand
     39  [hygienic-macros
     40
     41    ;; Generalized shift/reset implementations of some control operators
     42
     43    (define-syntax prompt
     44      (syntax-rules ()
     45        [(_ e) (greset hr-stop e)] ) )
     46
     47    (define-syntax control
     48      (syntax-rules ()
     49        [(_ f e) (gshift hs-prop f e)] ) )
     50
     51    (define-syntax prompt0
     52      (syntax-rules ()
     53        [(_ e) (greset hr-prop e)] ) )
     54
     55    (define-syntax shift0
     56      (syntax-rules ()
     57        [(_ f e) (gshift hs-stop f e)] ) ) ]
     58
     59  [else
     60
     61    ;; Generalized shift/reset implementations of some control operators
     62
     63    (define-macro (prompt E)
     64      `(greset hr-stop ,E) )
     65
     66    (define-macro (control F E)
     67      `(gshift hs-prop ,F ,E) )
     68
     69    (define-macro (prompt0 E)
     70      `(greset hr-prop ,E) )
     71
     72    (define-macro (shift0 F E)
     73      `(gshift hs-stop ,F ,E) ) ] )
     74
     75;;;
    8176
    8277(define-test shift-reset-test "Shift/Reset Family"
     
    423418(test::for-each (cut test::styler-set! <> test::output-style-human))
    424419(run-test "Shift Reset Tests")
     420
     421(test::forget!)
Note: See TracChangeset for help on using the changeset viewer.