exporting make-state-variable in SRFI 166 (issue #683)

This commit is contained in:
Alex Shinn 2020-08-17 21:56:57 +09:00
parent 421e357e98
commit 6be0e8d059
4 changed files with 7 additions and 5 deletions

View file

@ -7,7 +7,7 @@
((define-state-variables var ...) ((define-state-variables var ...)
(begin (begin
(define var (define var
(make-computation-environment-variable 'var #f #f)) (make-state-variable 'var #f #f))
...)))) ...))))
(define-state-variables (define-state-variables

View file

@ -21,5 +21,5 @@
cpp-error cpp-warning cpp-stringify cpp-sym-cat cpp-error cpp-warning cpp-stringify cpp-sym-cat
c-comment c-block-comment c-attribute) c-comment c-block-comment c-attribute)
(import (chibi) (chibi string) (chibi show) (chibi show pretty) (import (chibi) (chibi string) (chibi show) (chibi show pretty)
(srfi 1) (srfi 165) (scheme cxr)) (srfi 1) (scheme cxr))
(include "c.scm")) (include "c.scm"))

View file

@ -12,7 +12,8 @@
(rename (srfi 165) (rename (srfi 165)
(computation-each sequence) (computation-each sequence)
(computation-with! with!) (computation-with! with!)
(computation-forked forked)) (computation-forked forked)
(make-computation-environment-variable make-state-variable))
(chibi show shared)) (chibi show shared))
(cond-expand (cond-expand
(chibi (chibi
@ -45,6 +46,7 @@
;; computations ;; computations
fn with with! forked call-with-output fn with with! forked call-with-output
;; state variables ;; state variables
make-state-variable
port row col width output writer pad-char ellipsis port row col width output writer pad-char ellipsis
string-width substring/width substring/preserve string-width substring/width substring/preserve
radix precision decimal-sep decimal-align sign-rule radix precision decimal-sep decimal-align sign-rule

View file

@ -1,6 +1,6 @@
(define-library (srfi 166 color) (define-library (srfi 166 color)
(import (scheme base) (srfi 130) (srfi 165) (srfi 166 base)) (import (scheme base) (srfi 130) (srfi 166 base))
(export (export
;; foreground ;; foreground
as-red as-blue as-green as-cyan as-yellow as-red as-blue as-green as-cyan as-yellow
@ -14,5 +14,5 @@
) )
(begin (begin
(define color (define color
(make-computation-environment-variable 'color #f #f))) (make-state-variable 'color #f #f)))
(include "color.scm")) (include "color.scm"))