Changeset 39681 in project


Ignore:
Timestamp:
03/12/21 23:08:35 (6 weeks ago)
Author:
Kon Lovett
Message:

reorg, strict

Location:
release/5/srfi-45/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/5/srfi-45/trunk/srfi-45.egg

    r39679 r39681  
    1212  (extension srfi-45
    1313    (types-file)
    14     (csc-options
    15       ;"-disable-interrupts" ;C4 ??
    16       "-O3" "-d1" "-no-procedure-checks") ) ) )
     14    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks") ) ) )
  • release/5/srfi-45/trunk/srfi-45.scm

    r39675 r39681  
    3434  check-errors)
    3535
    36 ;unsafe
     36;very unsafe
    3737(include "chicken-primitive-object-inlines")
    3838
     
    114114  (%promise-box-value-set! promise-box promise) )
    115115
    116 ;;
     116;; Use SRFI 45 strict semantics for lazy promise
     117
     118(define lazy-strict (make-parameter #t))
     119
     120;; Constructors
    117121
    118122(define (*make-lazy-promise thunk)  (%make-lazy-promise thunk))
    119123(define (*make-eager-promise thunk) (%make-eager-promise (call-with-values thunk list)))
    120 
    121 ;; Constructors
    122124
    123125(define-syntax lazy
     
    135137;; Predicates
    136138
     139(define (promise? obj) (or (r5rs:promise? obj) (%recursive-promise? obj)))
     140
    137141(define (lazy-promise? obj)       (%lazy-promise? obj))
    138142(define (eager-promise? obj)      (%eager-promise? obj))
    139143(define (recursive-promise? obj)  (%recursive-promise? obj))
    140144
    141 (define (promise? obj) (or (r5rs:promise? obj) (%recursive-promise? obj)))
    142 
    143 ;; Use SRFI 45 strict semantics for lazy promise
    144 
    145 (define lazy-strict (make-parameter #t (lambda (x) (%->boolean x))))
    146 
    147145;; What kinda promise
    148146
    149 #; ;FIXME this doesn't work
     147;FIXME this doesn't work
    150148(define-record-printer (recursive-promise obj out)
    151149  (display "#<" out)
Note: See TracChangeset for help on using the changeset viewer.