SRFI-99

Check-in [6e33be7cc6]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added imports for extend-procedure and procedure-data, re-enabled tests
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | chicken-5
Files: files | file ages | folders
SHA1: 6e33be7cc675d4d5bc6c9ace2db16c6365d4ceb1
User & Date: murphy 2018-08-14 11:27:46
Context
2018-08-18
00:14
Cleanup files, set version Leaf check-in: 6cd10267ff user: murphy tags: chicken-5, v1.4.5
2018-08-14
11:27
Added imports for extend-procedure and procedure-data, re-enabled tests check-in: 6e33be7cc6 user: murphy tags: chicken-5
2018-06-21
10:32
Add a dependency to miscmacros check-in: 37af701d95 user: kooda tags: chicken-5
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to srfi-99.scm.

492
493
494
495
496
497
498
499
500


501
502
503
504
505
506
507
)

(module srfi-99-variants
  (define-variant-type
   define-variant-constructor
   variant-case)
  (import
   scheme (except (chicken base) define-record-type)
   (chicken module)


   miscmacros srfi-99-records)

(define-syntax define-variant-type
  (syntax-rules ()
    ((define-variant-type (rtd option ...) predicate
       (variant field ...)
       ...)







|

>
>







492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
)

(module srfi-99-variants
  (define-variant-type
   define-variant-constructor
   variant-case)
  (import
   scheme
   (chicken module)
   (except (chicken base) define-record-type)
   (only (chicken memory representation) extend-procedure procedure-data)
   miscmacros srfi-99-records)

(define-syntax define-variant-type
  (syntax-rules ()
    ((define-variant-type (rtd option ...) predicate
       (variant field ...)
       ...)

Name change from test/run.scm to tests/run.scm.

20
21
22
23
24
25
26

27
28
29
30
31
32
33
34
;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
;; BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
;; ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
;; CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
;; SOFTWARE.

(import

 srfi-99 test)

(test-group "procedural layer"

  (test-group "RTD creation"
    (test-assert "null record" (rtd? (make-rtd 'foo '#())))
    (test-error "bad name" (make-rtd 42 '#()))
    (test-error "bad fields" (make-rtd 'foo '#((murks quark))))







>
|







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
;; BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
;; ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
;; CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
;; SOFTWARE.

(import
 (only (chicken memory representation) procedure-data)
 srfi-1 srfi-99 test)

(test-group "procedural layer"

  (test-group "RTD creation"
    (test-assert "null record" (rtd? (make-rtd 'foo '#())))
    (test-error "bad name" (make-rtd 42 '#()))
    (test-error "bad fields" (make-rtd 'foo '#((murks quark))))