use spaces instead of tabs to indent output

svn: r15719
This commit is contained in:
Eli Barzilay 2009-08-12 21:37:33 +00:00
parent 829c8416b6
commit 95f4d1eefe

View File

@ -19,31 +19,42 @@
(format "~a~a *~a" doms-string rst rng-string)] (format "~a~a *~a" doms-string rst rng-string)]
[else (string-append (stringify (map make-printable dom)) rng-string)]))) [else (string-append (stringify (map make-printable dom)) rng-string)])))
(define (domain-mismatches ty doms rests drests rngs arg-tys tail-ty tail-bound #:expected [expected #f]) (define (domain-mismatches ty doms rests drests rngs arg-tys tail-ty tail-bound
#:expected [expected #f])
(define arguments-str (define arguments-str
(stringify-domain arg-tys (if (not tail-bound) tail-ty #f) (if tail-bound (cons tail-ty tail-bound) #f))) (stringify-domain arg-tys
(if (not tail-bound) tail-ty #f)
(if tail-bound (cons tail-ty tail-bound) #f)))
(cond (cond
[(null? doms) [(null? doms)
(int-err "How could doms be null: ~a ~a" ty)] (int-err "How could doms be null: ~a ~a" ty)]
[(= 1 (length doms)) [(= 1 (length doms))
(format "Domain: ~a~nArguments: ~a~n~a" (string-append
(stringify-domain (car doms) (car rests) (car drests)) "Domain: "
arguments-str (stringify-domain (car doms) (car rests) (car drests))
(if expected "\nArguments: "
(format "Result type: ~a~nExpected result: ~a~n" arguments-str
(car rngs) (make-printable expected)) "\n"
""))] (if expected
(format "Result type: ~a\nExpected result: ~a\n"
(car rngs) (make-printable expected))
""))]
[else [else
(format "~a: ~a~nArguments: ~a~n~a" (let ([label (if expected "Types: " "Domains: ")]
(if expected "Types" "Domains") [nl+spc (if expected "\n " "\n ")]
(stringify (if expected [pdoms (map make-printable doms)])
(map stringify-domain (map make-printable doms) rests drests rngs) (string-append
(map stringify-domain (map make-printable doms) rests drests)) label
"~n\t") (stringify (if expected
arguments-str (map stringify-domain pdoms rests drests rngs)
(if expected (map stringify-domain pdoms rests drests))
(format "Expected result: ~a~n" (make-printable expected)) nl+spc)
""))])) "\nArguments: "
arguments-str
"\n"
(if expected
(format "Expected result: ~a\n" (make-printable expected))
"")))]))
(define (poly-fail t argtypes #:name [name #f] #:expected [expected #f]) (define (poly-fail t argtypes #:name [name #f] #:expected [expected #f])
(match t (match t