minor reformatting (brackets, spaces, indents)

svn: r12003
This commit is contained in:
Eli Barzilay 2008-10-13 15:29:13 +00:00
parent 9e316c3162
commit 9ba08bc558

View File

@ -9,72 +9,66 @@
[raise (Univ . -> . (Un))] [raise (Univ . -> . (Un))]
(car (-poly (a b) (cl-> [((-pair a b)) a] [car (-poly (a b) (cl-> [((-pair a b)) a]
[((make-Listof a)) a]))) [((make-Listof a)) a]))]
[first (-poly (a b) (cl-> [((-pair a b)) a] [first (-poly (a b) (cl-> [((-pair a b)) a]
[((make-Listof a)) a]))] [((make-Listof a)) a]))]
[second (-poly (a b c) [second (-poly (a b c)
(cl-> (cl-> [((-pair a (-pair b c))) b]
[((-pair a (-pair b c))) b] [((-lst a)) a]))]
[((-lst a)) a]))]
[third (-poly (a b c d) [third (-poly (a b c d)
(cl-> (cl-> [((-pair a (-pair b (-pair c d)))) c]
[((-pair a (-pair b (-pair c d)))) c] [((-lst a)) a]))]
[((-lst a)) a]))]
[fourth (-poly (a) ((-lst a) . -> . a))] [fourth (-poly (a) ((-lst a) . -> . a))]
[fifth (-poly (a) ((-lst a) . -> . a))] [fifth (-poly (a) ((-lst a) . -> . a))]
[sixth (-poly (a) ((-lst a) . -> . a))] [sixth (-poly (a) ((-lst a) . -> . a))]
[rest (-poly (a) ((-lst a) . -> . (-lst a)))] [rest (-poly (a) ((-lst a) . -> . (-lst a)))]
(cadr [cadr (-poly (a b c)
(-poly (a b c) (cl-> [((-pair a (-pair b c))) b]
(cl-> [((-lst a)) a]))]
[((-pair a (-pair b c))) b] [caddr (-poly (a) (-> (-lst a) a))]
[((-lst a)) a]))) [cadddr (-poly (a) (-> (-lst a) a))]
(caddr (-poly (a) (-> (-lst a) a))) [cdr (-poly (a b) (cl-> [((-pair a b)) b]
(cadddr (-poly (a) (-> (-lst a) a))) [((make-Listof a)) (make-Listof a)]))]
(cdr (-poly (a b) (cl-> [((-pair a b)) b] [cddr (-poly (a) (-> (make-Listof a) (make-Listof a)))]
[((make-Listof a)) (make-Listof a)]))) [cdddr (-poly (a) (-> (make-Listof a) (make-Listof a)))]
(cddr (-poly (a) (-> (make-Listof a) (make-Listof a)))) [cons (-poly (a b)
(cdddr (-poly (a) (-> (make-Listof a) (make-Listof a))))
(cons (-poly (a b)
(cl-> [(a (-lst a)) (-lst a)] (cl-> [(a (-lst a)) (-lst a)]
[(a b) (-pair a b)]))) [(a b) (-pair a b)]))]
[*cons (-poly (a b) (cl-> [*cons (-poly (a b) (cl->
[(a b) (-pair a b)] [(a b) (-pair a b)]
[(a (-lst a)) (-lst a)]))] [(a (-lst a)) (-lst a)]))]
[*list? (make-pred-ty (-lst Univ))] [*list? (make-pred-ty (-lst Univ))]
(null? (make-pred-ty (-val null))) [null? (make-pred-ty (-val null))]
(eof-object? (make-pred-ty (-val eof))) [eof-object? (make-pred-ty (-val eof))]
[null (-val null)] [null (-val null)]
(number? (make-pred-ty N)) [number? (make-pred-ty N)]
[char? (make-pred-ty -Char)] [char? (make-pred-ty -Char)]
(integer? (make-pred-ty -Integer)) [integer? (make-pred-ty -Integer)]
(boolean? (make-pred-ty B)) [boolean? (make-pred-ty B)]
(add1 (cl->* [add1 (cl->* (-> -Integer -Integer)
(-> -Integer -Integer) (-> N N))]
(-> N N))) [sub1 (cl->* #;(-> -Integer -Integer)
(sub1 (cl->* (-> N N))]
#;(-> -Integer -Integer) [eq? (-> Univ Univ B)]
(-> N N))) [eqv? (-> Univ Univ B)]
(eq? (-> Univ Univ B)) [equal? (-> Univ Univ B)]
(eqv? (-> Univ Univ B)) [even? (-> N B)]
(equal? (-> Univ Univ B))
(even? (-> N B))
[assert (-poly (a) (-> (*Un a (-val #f)) a))] [assert (-poly (a) (-> (*Un a (-val #f)) a))]
[gensym (cl-> [(Sym) Sym] [gensym (cl-> [(Sym) Sym]
[() Sym])] [() Sym])]
[string-append (->* null -String -String)] [string-append (->* null -String -String)]
[open-input-string (-> -String -Input-Port)] [open-input-string (-> -String -Input-Port)]
[open-output-file [open-output-file
(->key -Pathlike (->key -Pathlike
#:mode (one-of/c 'binary 'text) #f #:mode (one-of/c 'binary 'text) #f
#:exists (one-of/c 'error 'append 'update 'can-update #:exists (one-of/c 'error 'append 'update 'can-update
'replace 'truncate 'replace 'truncate
'must-truncate 'truncate/replace) 'must-truncate 'truncate/replace)
#f #f
-Output-Port)] -Output-Port)]
[read (cl-> [read (cl->
[(-Port) -Sexp] [(-Port) -Sexp]
[() -Sexp])] [() -Sexp])]
[ormap (-polydots (a c b) (->... (list (->... (list a) (b b) c) (-lst a)) ((-lst b) b) c))] [ormap (-polydots (a c b) (->... (list (->... (list a) (b b) c) (-lst a)) ((-lst b) b) c))]
@ -132,46 +126,39 @@
(cl-> [((-lst a) (-lst a)) (-lst a)] (cl-> [((-lst a) (-lst a)) (-lst a)]
[((-lst a) (-lst b) (a b . -> . B)) (-lst b)]))] [((-lst a) (-lst b) (a b . -> . B)) (-lst b)]))]
(error [error
(make-Function (list (make-Function (list (make-arr null (Un))
(make-arr null (Un)) (make-arr (list Sym -String) (Un) Univ)
(make-arr (list Sym -String) (Un) Univ) (make-arr (list -String) (Un) Univ)
(make-arr (list -String) (Un) Univ) (make-arr (list Sym) (Un))))]
(make-arr (list Sym) (Un)))))
[namespace-variable-value
(cl-> [(Sym) Univ]
[(Sym B -Namespace (-> Univ)) Univ])]
[namespace-variable-value [match:error (Univ . -> . (Un))]
(cl-> [display (cl-> [(Univ) -Void] [(Univ -Port) -Void])]
[(Sym) Univ]
[(Sym B -Namespace (-> Univ)) Univ])]
(match:error (Univ . -> . (Un)))
(display
(cl->
[(Univ) -Void]
[(Univ -Port) -Void]))
[void (->* '() Univ -Void)] [void (->* '() Univ -Void)]
[void? (make-pred-ty -Void)] [void? (make-pred-ty -Void)]
[printf (->* (list -String) Univ -Void)] [printf (->* (list -String) Univ -Void)]
[fprintf (->* (list -Output-Port -String) Univ -Void)] [fprintf (->* (list -Output-Port -String) Univ -Void)]
[format (->* (list -String) Univ -String)] [format (->* (list -String) Univ -String)]
(fst (-poly (a b) (-> (-pair a b) a))) [fst (-poly (a b) (-> (-pair a b) a))]
(snd (-poly (a b) (-> (-pair a b) b))) [snd (-poly (a b) (-> (-pair a b) b))]
(= (->* (list N N) N B)) [= (->* (list N N) N B)]
(>= (->* (list N N) N B)) [>= (->* (list N N) N B)]
(< (->* (list N N) N B)) [< (->* (list N N) N B)]
(<= (->* (list N N) N B)) [<= (->* (list N N) N B)]
[> (->* (list N) N B)] [> (->* (list N) N B)]
(zero? (N . -> . B)) [zero? (N . -> . B)]
(* (cl->* (->* '() -Integer -Integer) (->* '() N N))) [* (cl->* (->* '() -Integer -Integer) (->* '() N N))]
(/ (cl->* (->* (list N) N N))) [/ (cl->* (->* (list N) N N))]
(+ (cl->* (->* '() -Integer -Integer) (->* '() N N))) [+ (cl->* (->* '() -Integer -Integer) (->* '() N N))]
(- (cl->* (->* (list -Integer) -Integer -Integer) (->* (list N) N N))) [- (cl->* (->* (list -Integer) -Integer -Integer) (->* (list N) N N))]
(max (->* (list N) N N)) [max (->* (list N) N N)]
(min (->* (list N) N N)) [min (->* (list N) N N)]
[vector-ref [vector-ref (-poly (a) ((-vec a) N . -> . a))]
(-poly (a) ((-vec a) N . -> . a))]
[build-vector (-poly (a) (-Integer (-Integer . -> . a) . -> . (-vec a)))] [build-vector (-poly (a) (-Integer (-Integer . -> . a) . -> . (-vec a)))]
[build-list (-poly (a) (-Integer (-Integer . -> . a) . -> . (-lst a)))] [build-list (-poly (a) (-Integer (-Integer . -> . a) . -> . (-lst a)))]
[reverse (-poly (a) (-> (make-Listof a) (make-Listof a)))] [reverse (-poly (a) (-> (make-Listof a) (make-Listof a)))]
@ -180,8 +167,7 @@
[memq (-poly (a) (-> a (make-Listof a) (-opt (make-Listof a))))] [memq (-poly (a) (-> a (make-Listof a) (-opt (make-Listof a))))]
[memv (-poly (a) (-> a (make-Listof a) (-opt (make-Listof a))))] [memv (-poly (a) (-> a (make-Listof a) (-opt (make-Listof a))))]
[memf (-poly (a) ((a . -> . B) (-lst a) . -> . (-opt (-lst a))))] [memf (-poly (a) ((a . -> . B) (-lst a) . -> . (-opt (-lst a))))]
[member [member (-poly (a) (a (-lst a) . -> . (-opt (-lst a))))]
(-poly (a) (a (-lst a) . -> . (-opt (-lst a))))]
[findf (-poly (a) ((a . -> . B) (-lst a) . -> . (-opt a)))] [findf (-poly (a) ((a . -> . B) (-lst a) . -> . (-opt a)))]
[string<? (->* (list -String -String) -String B)] [string<? (->* (list -String -String) -String B)]
@ -227,20 +213,14 @@
[build-path ((list -Pathlike*) -Pathlike* . ->* . -Path)] [build-path ((list -Pathlike*) -Pathlike* . ->* . -Path)]
[string->number (-> -String (-opt N))] [string->number (-> -String (-opt N))]
[with-input-from-file [with-input-from-file
(-poly (a) (-poly (a) (cl-> [(-Pathlike (-> a)) a]
(cl-> [(-Pathlike (-> a) Sym) a]))]
[(-Pathlike (-> a)) a]
[(-Pathlike (-> a) Sym) a]))]
[with-output-to-file [with-output-to-file
(-poly (a) (-poly (a) (cl-> [(-Pathlike (-> a)) a]
(cl-> [(-Pathlike (-> a) Sym) a]))]
[(-Pathlike (-> a)) a]
[(-Pathlike (-> a) Sym) a]))]
[random (cl-> [random (cl-> [(-Integer) -Integer] [() -Integer])]
[(-Integer) -Integer]
[() -Integer])]
[assoc (-poly (a b) (a (-lst (-pair a b)) . -> . (-opt (-pair a b))))] [assoc (-poly (a b) (a (-lst (-pair a b)) . -> . (-opt (-pair a b))))]
[assf (-poly (a b) [assf (-poly (a b)
@ -275,7 +255,7 @@
[current-command-line-arguments (-Param (-vec -String) (-vec -String))] [current-command-line-arguments (-Param (-vec -String) (-vec -String))]
;; regexp stuff ;; regexp stuff
[regexp-match [regexp-match
(cl-> (cl->
[((*Un -String -Regexp) -String) (-opt (-lst (-opt -String)))] [((*Un -String -Regexp) -String) (-opt (-lst (-opt -String)))]
[(-Pattern -String) (-opt (-lst (-opt (*Un -Bytes -String))))] [(-Pattern -String) (-opt (-lst (-opt (*Un -Bytes -String))))]
@ -324,36 +304,25 @@
[denominator (N . -> . -Integer)] [denominator (N . -> . -Integer)]
[exact->inexact (N . -> . N)] [exact->inexact (N . -> . N)]
[inexact->exact (N . -> . N)] [inexact->exact (N . -> . N)]
[make-string [make-string (cl-> [(N) -String] [(N -Char) -String])]
(cl->
[(N) -String]
[(N -Char) -String])]
[arithmetic-shift (-Integer -Integer . -> . -Integer)] [arithmetic-shift (-Integer -Integer . -> . -Integer)]
[abs (N . -> . N)] [abs (N . -> . N)]
[substring (cl-> [(-String N) -String] [substring (cl-> [(-String N) -String]
[(-String N N) -String])] [(-String N N) -String])]
[string-length (-String . -> . N)] [string-length (-String . -> . N)]
[string-set! (-String N -Char . -> . -Void)] [string-set! (-String N -Char . -> . -Void)]
[make-vector [make-vector (-poly (a) (cl-> [(N) (-vec N)] [(N a) (-vec a)]))]
(-poly (a)
(cl->
[(N) (-vec N)]
[(N a) (-vec a)]))]
[file-exists? (-Pathlike . -> . B)] [file-exists? (-Pathlike . -> . B)]
[string->symbol (-String . -> . Sym)] [string->symbol (-String . -> . Sym)]
[symbol->string (Sym . -> . -String)] [symbol->string (Sym . -> . -String)]
[vector-length (-poly (a) ((-vec a) . -> . N))] [vector-length (-poly (a) ((-vec a) . -> . N))]
[call-with-input-file (-poly (a) [call-with-input-file (-poly (a) (cl-> [(-String (-Port . -> . a)) a]
(cl-> [(-String (-Port . -> . a) Sym) a]))]
[(-String (-Port . -> . a)) a]
[(-String (-Port . -> . a) Sym) a]))]
[call-with-output-file (-poly (a) [call-with-output-file (-poly (a) (cl-> [(-String (-Port . -> . a)) a]
(cl-> [(-String (-Port . -> . a) Sym) a]))]
[(-String (-Port . -> . a)) a]
[(-String (-Port . -> . a) Sym) a]))]
[current-output-port (-Param -Output-Port -Output-Port)] [current-output-port (-Param -Output-Port -Output-Port)]
[current-error-port (-Param -Output-Port -Output-Port)] [current-error-port (-Param -Output-Port -Output-Port)]
[current-input-port (-Param -Input-Port -Input-Port)] [current-input-port (-Param -Input-Port -Input-Port)]
@ -361,7 +330,7 @@
[seconds->date (N . -> . (make-Name #'date))] [seconds->date (N . -> . (make-Name #'date))]
[current-seconds (-> N)] [current-seconds (-> N)]
[sqrt (-> N N)] [sqrt (-> N N)]
[path->string (-> -Path -String)] [path->string (-> -Path -String)]
[link-exists? (-> -Pathlike B)] [link-exists? (-> -Pathlike B)]
[directory-exists? (-> -Pathlike B)] [directory-exists? (-> -Pathlike B)]
@ -377,63 +346,53 @@
[hash-set! (-poly (a b) ((-HT a b) a b . -> . -Void))] [hash-set! (-poly (a b) ((-HT a b) a b . -> . -Void))]
[hash-map (-poly (a b c) ((-HT a b) (a b . -> . c) . -> . (-lst c)))] [hash-map (-poly (a b c) ((-HT a b) (a b . -> . c) . -> . (-lst c)))]
[hash-ref (-poly (a b c) [hash-ref (-poly (a b c)
(cl-> (cl-> [((-HT a b) a) b]
(((-HT a b) a) b) [((-HT a b) a (-> c)) (*Un b c)]
(((-HT a b) a (-> c)) (*Un b c)) [((-HT a b) a c) (*Un b c)]))]
(((-HT a b) a c) (*Un b c))))]
#;[hash-table-index (-poly (a b) ((-HT a b) a b . -> . -Void))] #;[hash-table-index (-poly (a b) ((-HT a b) a b . -> . -Void))]
[bytes (->* (list) N -Bytes)] [bytes (->* (list) N -Bytes)]
[bytes-ref (-> -Bytes N N)] [bytes-ref (-> -Bytes N N)]
[bytes-append (->* (list -Bytes) -Bytes -Bytes)] [bytes-append (->* (list -Bytes) -Bytes -Bytes)]
[subbytes (cl-> [subbytes (cl-> [(-Bytes N) -Bytes] [(-Bytes N N) -Bytes])]
[(-Bytes N) -Bytes]
[(-Bytes N N) -Bytes])]
[bytes-length (-> -Bytes N)] [bytes-length (-> -Bytes N)]
[open-input-file (->key -Pathlike #:mode (Un (-val 'binary) (-val 'text)) #f -Input-Port)] [open-input-file (->key -Pathlike #:mode (Un (-val 'binary) (-val 'text)) #f -Input-Port)]
[close-input-port (-> -Input-Port -Void)] [close-input-port (-> -Input-Port -Void)]
[close-output-port (-> -Output-Port -Void)] [close-output-port (-> -Output-Port -Void)]
[read-line (cl-> [read-line (cl-> [() -String]
[() -String] [(-Input-Port) -String]
[(-Input-Port) -String] [(-Input-Port Sym) -String])]
[(-Input-Port Sym) -String])] [copy-file (-> -Pathlike -Pathlike -Void)]
[copy-file (-> -Pathlike -Pathlike -Void)]
[bytes->string/utf-8 (-> -Bytes -String)] [bytes->string/utf-8 (-> -Bytes -String)]
[force (-poly (a) (-> (-Promise a) a))] [force (-poly (a) (-> (-Promise a) a))]
[bytes<? (->* (list -Bytes) -Bytes B)] [bytes<? (->* (list -Bytes) -Bytes B)]
[regexp-replace* [regexp-replace*
(cl->* (cl->* (-Pattern (*Un -Bytes -String) (*Un -Bytes -String) . -> . -Bytes)
(-Pattern (*Un -Bytes -String) (*Un -Bytes -String) . -> . -Bytes) (-Pattern -String -String . -> . -String))]
(-Pattern -String -String . -> . -String))]
[peek-char [peek-char
(cl->* (cl->* [-> -Char]
[-> -Char] [-Input-Port . -> . -Char]
[-Input-Port . -> . -Char] [-Input-Port N . -> . -Char]
[-Input-Port N . -> . -Char] [N . -> . -Char])]
[N . -> . -Char])]
[peek-byte [peek-byte
(cl->* (cl->* [-> -Byte]
[-> -Byte] [-Input-Port . -> . -Byte]
[-Input-Port . -> . -Byte] [-Input-Port N . -> . -Byte]
[-Input-Port N . -> . -Byte] [N . -> . -Byte])]
[N . -> . -Byte])]
[make-pipe [make-pipe
(cl->* (cl->* [-> (-values (list -Input-Port -Output-Port))]
[-> (-values (list -Input-Port -Output-Port))] [N . -> . (-values (list -Input-Port -Output-Port))])]
[N . -> . (-values (list -Input-Port -Output-Port))])]
[open-output-bytes [open-output-bytes
(cl->* (cl->* [-> -Output-Port]
[-> -Output-Port] [Univ . -> . -Output-Port])]
[Univ . -> . -Output-Port])]
[get-output-bytes [get-output-bytes
(cl->* (cl->* [-Output-Port . -> . -Bytes]
[-Output-Port . -> . -Bytes] [-Output-Port Univ . -> . -Bytes]
[-Output-Port Univ . -> . -Bytes] [-Output-Port Univ N . -> . -Bytes]
[-Output-Port Univ N . -> . -Bytes] [-Output-Port Univ N N . -> . -Bytes]
[-Output-Port Univ N N . -> . -Bytes] [-Output-Port N . -> . -Bytes]
[-Output-Port N . -> . -Bytes] [-Output-Port N N . -> . -Bytes])]
[-Output-Port N N . -> . -Bytes])]
#;[exn:fail? (-> Univ B)] #;[exn:fail? (-> Univ B)]
#;[exn:fail:read? (-> Univ B)] #;[exn:fail:read? (-> Univ B)]
@ -465,7 +424,7 @@
[syntax-source (-poly (a) (-> (-Syntax a) Univ))] [syntax-source (-poly (a) (-> (-Syntax a) Univ))]
[syntax-position (-poly (a) (-> (-Syntax a) (-opt N)))] [syntax-position (-poly (a) (-> (-Syntax a) (-opt N)))]
[datum->syntax (cl->* [datum->syntax (cl->*
(-> (-opt (-Syntax Univ)) Sym (-Syntax Sym)) (-> (-opt (-Syntax Univ)) Sym (-Syntax Sym))
(-> (-opt (-Syntax Univ)) Univ (-Syntax Univ)))] (-> (-opt (-Syntax Univ)) Univ (-Syntax Univ)))]
[syntax->datum (-poly (a) (-> (-Syntax a) Univ))] [syntax->datum (-poly (a) (-> (-Syntax a) Univ))]