Changeset 33182 in project


Ignore:
Timestamp:
02/13/16 19:42:15 (4 years ago)
Author:
sjamaan
Message:

srfi-1: Bring types file in synch with latest changes in master, and add missing types for "assoc" and "member"

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

Legend:

Unmodified
Added
Removed
  • release/5/srfi-1/trunk/srfi-1.setup

    r32318 r33182  
    11;; -*- Scheme -*-
    2 
    32
    43(compile srfi-1.scm -O3 -d1 -sJ)
     
    98 'srfi-1
    109 '("srfi-1.so" "srfi-1.import.so" "srfi-1.o" "srfi-1.types")
    11  '((version "1.0")))
     10 '((version "1.2")))
    1211
  • release/5/srfi-1/trunk/srfi-1.types

    r32337 r33182  
    11;; srfi-1 -*- Scheme -*-
    22
    3 (srfi-1#alist-cons (forall (a b c) (#(procedure #:clean) srfi-1#alist-cons (a b (list-of c)) (pair a (pair b (list-of c))))))
    4 (srfi-1#alist-copy (forall (a) (#(procedure #:clean #:enforce) srfi-1#alist-copy ((list-of a)) (list-of a))))
    5 (srfi-1#alist-delete (forall (a b) (#(procedure #:enforce) srfi-1#alist-delete (a (list-of b) #!optional (procedure (a b) *)) list)))
    6 (srfi-1#alist-delete! (forall (a b) (#(procedure #:enforce) srfi-1#alist-delete! (a (list-of b) #!optional (procedure (a b) *)) undefined)))
     3(srfi-1#alist-cons
     4 (forall (a b c) (#(procedure #:pure) srfi-1#alist-cons (a b (list-of c))
     5                  (pair (pair a b) (list-of c)))))
     6(srfi-1#alist-copy
     7 (forall (a b) (#(procedure #:clean #:enforce) srfi-1#alist-copy
     8                ((list-of (pair a b))) (list-of (pair a b)))))
     9(srfi-1#alist-delete
     10 (forall (a b c) (#(procedure #:clean) srfi-1#alist-delete
     11                  (a (list-of (pair b c)) #!optional (procedure (a b) *))
     12                  (list-of (pair b c)))))
     13(srfi-1#alist-delete!
     14 (forall (a b c) (#(procedure) srfi-1#alist-delete!
     15                  (a (list-of (pair b c)) #!optional (procedure (a b) *))
     16                  (list-of (pair b c)))))
    717(srfi-1#any (forall (a) (#(procedure #:enforce) srfi-1#any ((procedure (a #!rest) *) (list-of a) #!rest list) *)))
    818(srfi-1#append! (#(procedure #:enforce) srfi-1#append! (#!rest list) list))
     
    1828(srfi-1#append-reverse (#(procedure #:clean #:enforce) srfi-1#append-reverse (list list) list))
    1929(srfi-1#append-reverse! (#(procedure #:enforce) srfi-1#append-reverse! (list list) list))
     30(srfi-1#assoc
     31 (forall (a b c) (#(procedure #:clean #:foldable) srfi-1#assoc
     32                  (a (list-of (pair b c)) #!optional (procedure (a b) *))
     33                  (or false (pair b c)))) ; sic
     34 ((* null) (let ((#(tmp) #(1))) '#f))
     35 (((or symbol procedure immediate) (list-of pair))
     36  (##core#inline "C_u_i_assq" #(1) #(2)))
     37 ((* (list-of (pair (or symbol procedure immediate) *)))
     38  (##core#inline "C_u_i_assq" #(1) #(2))))
     39
    2040(srfi-1#break (forall (a) (#(procedure #:enforce) srfi-1#break ((procedure (a) *) (list-of a)) (list-of a) (list-of a))))
    2141(srfi-1#break! (forall (a) (#(procedure #:enforce) srfi-1#break! ((procedure (a) *) (list-of a)) (list-of a) (list-of a))))
     
    154174  (a b)
    155175  (#(procedure #:enforce) srfi-1#map-in-order ((procedure (a #!rest) b) (list-of a) #!rest list) (list-of b))))
     176
     177(srfi-1#member
     178 (forall (a b) (#(procedure #:clean #:foldable) srfi-1#member
     179                (a (list-of b) #!optional (procedure (a b) *)) ; sic
     180                (or false (list-of b))))
     181 ((* null) (let ((#(tmp) #(1))) '#f))
     182 (((or symbol procedure immediate) list)
     183  (##core#inline "C_u_i_memq" #(1) #(2)))
     184 ((* (list-of (or symbol procedure immediate)))
     185  (##core#inline "C_u_i_memq" #(1) #(2))))
    156186
    157187(srfi-1#ninth (#(procedure #:clean #:enforce #:foldable) srfi-1#ninth (pair) *))
Note: See TracChangeset for help on using the changeset viewer.