Changeset 14711 in project for chicken


Ignore:
Timestamp:
05/19/09 22:04:13 (10 years ago)
Author:
felix winkelmann
Message:

types.db complete (thank god), scrutinizer fixes

Location:
chicken/branches/scrutiny
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • chicken/branches/scrutiny/TODO

    r14416 r14711  
    112112*** document type-specifiers
    113113*** allow giving toplevel procedure names to `scrutinize' option?
    114 *** write test file trigger every type of warning (diff with result file in test-suite)
     114*** write test file to trigger every type of warning (diff with result file in test-suite)
    115115
    116116
  • chicken/branches/scrutiny/scrutinizer.scm

    r14628 r14711  
    223223                                   (rtypes1 (if name1 (cdddr t) (cddr t)))
    224224                                   (name2 (and (named? pt) (cadr pt)))
    225                                    (atypes2 (if name1 (third pt) (second pt)))
    226                                    (rtypes2 (if name1 (cdddr pt) (cddr pt))))
     225                                   (atypes2 (if name2 (third pt) (second pt)))
     226                                   (rtypes2 (if name2 (cdddr pt) (cddr pt))))
    227227                              `(procedure
    228                                 ,@(if (eq? name1 name2) (list name1) '())
     228                                ,@(if (and name1 name2 (eq? name1 name2)) (list name1) '())
    229229                                ,(merge-argument-types atypes1 atypes2)
    230230                                ,@(merge-result-types rtypes1 rtypes2))))
     
    241241                                           (else (list t)))))
    242242                                 (cdr t)))
    243                             (ts2 (let loop ((ts ts))
    244                                    (cond ((null? ts) '())
     243                            (ts2 (let loop ((ts ts) (done '()))
     244                                   (cond ((null? ts) (reverse done))
    245245                                         ((eq? '* (car ts)) (return '*))
    246246                                         ((any (cut type<=? (car ts) <>) (cdr ts))
    247                                           (loop (cdr ts)))
    248                                          (else (cons (car ts) (loop (cdr ts))))))))
     247                                          (loop (cdr ts) done))
     248                                         ((any (cut type<=? (car ts) <>) done)
     249                                          (loop (cdr ts) done))
     250                                         (else (loop (cdr ts) (cons (car ts) done)))))))
    249251                       (cond ((equal? ts2 (cdr t)) t)
    250252                             (else
     
    354356  (define (match-results results1 results2)
    355357    (cond ((null? results1) (atom? results2))
    356           ((atom? results2))
     358          ((eq? '* results1))
     359          ((eq? '* results2))
     360          ((null? results2) #f)
    357361          ((match (car results1) (car results2))
    358362           (match-results (cdr results1) (cdr results2)))
  • chicken/branches/scrutiny/types.db

    r14704 r14711  
    437437(project (procedure project (fixnum) procedure))
    438438(queue->list (procedure queue->list ((struct queue)) list))
    439 (queue-add! (procedure queue-add! ((struct queue) *)) undefined)
     439(queue-add! (procedure queue-add! ((struct queue) *) undefined))
    440440(queue-empty? (procedure queue-empty? ((struct queue)) boolean))
    441441(queue-first (procedure queue-first ((struct queue)) *))
     
    449449(shuffle (procedure shuffle (list (procedure (fixnum) fixnum)) list))
    450450(sort (procedure sort ((or list vector) (procedure (* *) *)) (or list vector)))
    451 (sort! (procedure sort! ((or list vector) (procedure (* *) *)) undefined))
     451(sort! (procedure sort! ((or list vector) (procedure (* *) *)) (or list vector)))
    452452(sorted? (procedure sorted? ((or list vector) (procedure (* *) *)) boolean))
    453453(string-chomp (procedure string-chomp (string #!optional string) string))
     
    12971297(write-u8vector (procedure write-u8vector ((struct u8vector) #!optional port fixnum fixnum) undefined))
    12981298
    1299 #!eof
    1300 
    13011299;; srfi-69
    13021300
    1303 (alist->hash-table (procedure alist->hash-table () *))
    1304 (eq?-hash (procedure eq?-hash () *))
    1305 (equal?-hash (procedure equal?-hash () *))
    1306 (eqv?-hash (procedure eqv?-hash () *))
    1307 (hash (procedure hash () *))
    1308 (hash-by-identity (procedure hash-by-identity () *))
    1309 (hash-table->alist (procedure hash-table->alist () *))
    1310 (hash-table-clear! (procedure hash-table-clear! () *))
    1311 (hash-table-copy (procedure hash-table-copy () *))
    1312 (hash-table-delete! (procedure hash-table-delete! () *))
    1313 (hash-table-equivalence-function (procedure hash-table-equivalence-function () *))
    1314 (hash-table-exists? (procedure hash-table-exists? () *))
    1315 (hash-table-fold (procedure hash-table-fold () *))
    1316 (hash-table-for-each (procedure hash-table-for-each () *))
    1317 (hash-table-has-initial? (procedure hash-table-has-initial? () *))
    1318 (hash-table-hash-function (procedure hash-table-hash-function () *))
    1319 (hash-table-initial (procedure hash-table-initial () *))
    1320 (hash-table-keys (procedure hash-table-keys () *))
    1321 (hash-table-map (procedure hash-table-map () *))
    1322 (hash-table-max-load (procedure hash-table-max-load () *))
    1323 (hash-table-merge (procedure hash-table-merge () *))
    1324 (hash-table-merge! (procedure hash-table-merge! () *))
    1325 (hash-table-min-load (procedure hash-table-min-load () *))
    1326 (hash-table-ref (procedure hash-table-ref () *))
    1327 (hash-table-ref/default (procedure hash-table-ref/default () *))
    1328 (hash-table-remove! (procedure hash-table-remove! () *))
    1329 (hash-table-set! (procedure hash-table-set! () *))
    1330 (hash-table-size (procedure hash-table-size () *))
    1331 (hash-table-update! (procedure hash-table-update! () *))
    1332 (hash-table-update!/default (procedure hash-table-update!/default () *))
    1333 (hash-table-values (procedure hash-table-values () *))
    1334 (hash-table-walk (procedure hash-table-walk () *))
    1335 (hash-table-weak-keys (procedure hash-table-weak-keys () *))
    1336 (hash-table-weak-values (procedure hash-table-weak-values () *))
    1337 (hash-table? (procedure hash-table? () *))
    1338 (keyword-hash (procedure keyword-hash () *))
    1339 (make-hash-table (procedure make-hash-table () *))
    1340 (number-hash (procedure number-hash () *))
    1341 (object-uid-hash (procedure object-uid-hash () *))
    1342 (string-ci-hash (procedure string-ci-hash () *))
    1343 (string-hash (procedure string-hash () *))
    1344 (symbol-hash (procedure symbol-hash () *))
     1301(alist->hash-table (procedure alist->hash-table (list #!rest) (struct hash-table)))
     1302(eq?-hash (procedure eq?-hash (* #!optional fixnum) fixnum))
     1303(equal?-hash (procedure equal?-hash (* #!optional fixnum) fixnum))
     1304(eqv?-hash (procedure eqv?-hash (* #!optional fixnum) fixnum))
     1305(hash (procedure hash (* #!optional fixnum) fixnum))
     1306(hash-by-identity (procedure hash-by-identity (* #!optional fixnum) fixnum))
     1307(hash-table->alist (procedure hash-table->alist ((struct hash-table)) list))
     1308(hash-table-clear! (procedure hash-table-clear! ((struct hash-table)) undefined))
     1309(hash-table-copy (procedure hash-table-copy ((struct hash-table)) (struct hash-table)))
     1310(hash-table-delete! (procedure hash-table-delete! ((struct hash-table) *) boolean))
     1311(hash-table-equivalence-function (procedure hash-table-equivalence-function ((struct hash-table)) (procedure (* *) *)))
     1312(hash-table-exists? (procedure hash-table-exists? ((struct hash-table) *) boolean))
     1313(hash-table-fold (procedure hash-table-fold ((struct hash-table) (procedure (* * *) *) *) *))
     1314(hash-table-for-each (procedure hash-table-for-each ((struct hash-table) (procedure (* *) . *)) undefined))
     1315(hash-table-has-initial? (procedure hash-table-has-initial? ((struct hash-table)) boolean))
     1316(hash-table-hash-function (procedure hash-table-hash-function ((struct hash-table)) (procedure (* fixnum) fixnum)))
     1317(hash-table-initial (procedure hash-table-initial ((struct hash-table)) *))
     1318(hash-table-keys (procedure hash-table-keys ((struct hash-table)) list))
     1319(hash-table-map (procedure hash-table-map ((struct hash-table) (procedure (* *) *)) list))
     1320(hash-table-max-load (procedure hash-table-max-load ((struct hash-table)) fixnum))
     1321(hash-table-merge (procedure hash-table-merge ((struct hash-table) (struct hash-table)) (struct hash-table)))
     1322(hash-table-merge! (procedure hash-table-merge! ((struct hash-table) (struct hash-table)) undefined))
     1323(hash-table-min-load (procedure hash-table-min-load ((struct hash-table)) fixnum))
     1324(hash-table-ref (procedure hash-table-ref ((struct hash-table) * #!optional (procedure () *)) *))
     1325(hash-table-ref/default (procedure hash-table-ref/default ((struct hash-table) * (procedure () *)) *))
     1326(hash-table-remove! (procedure hash-table-remove! ((struct hash-table) (procedure (* *) *)) undefined))
     1327(hash-table-set! (procedure hash-table-set! ((struct hash-table) * *) undefined))
     1328(hash-table-size (procedure hash-table-size ((struct hash-table)) fixnum))
     1329(hash-table-update! (procedure hash-table-update! ((struct hash-table) * #!optional (procedure (*) *) (procedure () *)) *))
     1330(hash-table-update!/default (procedure hash-table-update!/default ((struct hash-table) * (procedure (*) *) (procedure () *)) *))
     1331(hash-table-values (procedure hash-table-values ((struct hash-table)) list))
     1332(hash-table-walk (procedure hash-table-walk ((struct hash-table) (procedure (* *) . *)) undefined))
     1333(hash-table-weak-keys (procedure hash-table-weak-keys ((struct hash-table)) boolean))
     1334(hash-table-weak-values (procedure hash-table-weak-values ((struct hash-table)) boolean))
     1335(hash-table? (procedure hash-table? (*) boolean))
     1336(keyword-hash (procedure keyword-hash (* #!optional fixnum) fixnum))
     1337(make-hash-table (procedure make-hash-table (#!rest) (struct hash-table)))
     1338(number-hash (procedure number-hash (fixnum #!optional fixnum) fixnum))
     1339(object-uid-hash (procedure object-uid-hash (* #!optional fixnum) fixnum))
     1340(string-ci-hash (procedure string-ci-hash (string #!optional fixnum) fixnum))
     1341(string-hash (procedure string-hash (string #!optional fixnum) fixnum))
     1342(symbol-hash (procedure symbol-hash (symbol #!optional fixnum) fixnum))
    13451343
    13461344;; tcp
    13471345
    1348 (tcp-abandon-port (procedure tcp-abandon-port () *))
    1349 (tcp-accept (procedure tcp-accept () *))
    1350 (tcp-accept-ready? (procedure tcp-accept-ready? () *))
    1351 (tcp-accept-timeout (procedure tcp-accept-timeout () *))
    1352 (tcp-addresses (procedure tcp-addresses () *))
    1353 (tcp-buffer-size (procedure tcp-buffer-size () *))
    1354 (tcp-close (procedure tcp-close () *))
    1355 (tcp-connect (procedure tcp-connect () *))
    1356 (tcp-connect-timeout (procedure tcp-connect-timeout () *))
    1357 (tcp-listen (procedure tcp-listen () *))
    1358 (tcp-listener-fileno (procedure tcp-listener-fileno () *))
    1359 (tcp-listener-port (procedure tcp-listener-port () *))
    1360 (tcp-listener? (procedure tcp-listener? () *))
    1361 (tcp-port-numbers (procedure tcp-port-numbers () *))
    1362 (tcp-read-timeout (procedure tcp-read-timeout () *))
    1363 (tcp-write-timeout (procedure tcp-write-timeout () *))
     1346(tcp-abandon-port (procedure tcp-abandon-port (port) undefined))
     1347(tcp-accept (procedure tcp-accept ((struct tcp-listener)) port port))
     1348(tcp-accept-ready? (procedure tcp-accept-ready? ((struct tcp-listener)) boolean))
     1349(tcp-accept-timeout (procedure tcp-accept-timeout (#!optional number) number))
     1350(tcp-addresses (procedure tcp-addresses (port) string string))
     1351(tcp-buffer-size (procedure tcp-buffer-size (#!optional fixnum) fixnum))
     1352(tcp-close (procedure tcp-close ((struct tcp-listener)) undefined))
     1353(tcp-connect (procedure tcp-connect (string #!optional fixnum) port port))
     1354(tcp-connect-timeout (procedure tcp-connect-timeout (#!optional number) number))
     1355(tcp-listen (procedure tcp-listen (fixnum #!optional fixnum *) (struct tcp-listener)))
     1356(tcp-listener-fileno (procedure tcp-listener-fileno ((struct tcp-listener)) fixnum))
     1357(tcp-listener-port (procedure tcp-listener-port ((struct tcp-listener)) fixnum))
     1358(tcp-listener? (procedure tcp-listener? (*) boolean))
     1359(tcp-port-numbers (procedure tcp-port-numbers (port) fixnum fixnum))
     1360(tcp-read-timeout (procedure tcp-read-timeout (#!optional number) number))
     1361(tcp-write-timeout (procedure tcp-write-timeout (#!optional number) number))
    13641362
    13651363;; utils
    13661364
    1367 (for-each-argv-line (procedure for-each-argv-line () *))
    1368 (for-each-line (procedure for-each-line () *))
    1369 (read-all (procedure read-all () *))
    1370 (system* (procedure system* () *))
    1371 (qs (procedure qs () *))
     1365(for-each-argv-line (procedure for-each-argv-line ((procedure (string) . *)) undefined))
     1366(for-each-line (procedure for-each-line ((procedure (string) . *) #!optional port) undefined))
     1367(read-all (procedure read-all (#!optional (or port string)) string))
     1368(system* (procedure system* (string #!rest) undefined))
     1369(qs (procedure qs (string) string))
    13721370
    13731371;; missing: setup-api, setup-download
Note: See TracChangeset for help on using the changeset viewer.