Changeset 14107 in project


Ignore:
Timestamp:
04/06/09 18:23:56 (11 years ago)
Author:
Kon Lovett
Message:

Force returns obj when not promise - per manual.

Location:
release/4/srfi-45
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • release/4/srfi-45/tags/2.0.1/srfi-45.scm

    r13837 r14107  
    6666(module srfi-45 (;export
    6767  ; SRFI 45
    68   lazy
     68  (lazy $finlzy)
    6969  eager
    7070  promise?
     
    7373  lazy-promise?
    7474  eager-promise?
    75   recursive-promise?
    76   ; Macro support
    77   $finlzy)
     75  recursive-promise?)
    7876
    7977(import (rename scheme (force r5rs:force))
     
    8482;; Errors
    8583
     84#; ;UNUSED
    8685(define (error-promise-type loc obj)
    8786  (##sys#signal-hook #:type-error loc "bad argument type - not a promise" obj) )
     
    190189    ((r5rs:promise? top) (r5rs:force top) )
    191190
    192     ; No promise at all
     191    ; No promise at all. Return object per the Chicken manual.
    193192    (else
    194      (error-promise-type 'force top) ) ) )
     193     top ) ) )
    195194
    196195;;;
  • release/4/srfi-45/trunk/srfi-45.scm

    r13837 r14107  
    6666(module srfi-45 (;export
    6767  ; SRFI 45
    68   lazy
     68  (lazy $finlzy)
    6969  eager
    7070  promise?
     
    7373  lazy-promise?
    7474  eager-promise?
    75   recursive-promise?
    76   ; Macro support
    77   $finlzy)
     75  recursive-promise?)
    7876
    7977(import (rename scheme (force r5rs:force))
     
    8482;; Errors
    8583
     84#; ;UNUSED
    8685(define (error-promise-type loc obj)
    8786  (##sys#signal-hook #:type-error loc "bad argument type - not a promise" obj) )
     
    190189    ((r5rs:promise? top) (r5rs:force top) )
    191190
    192     ; No promise at all
     191    ; No promise at all. Return object per the Chicken manual.
    193192    (else
    194      (error-promise-type 'force top) ) ) )
     193     top ) ) )
    195194
    196195;;;
Note: See TracChangeset for help on using the changeset viewer.