use spaces instead of tabs to indent output
svn: r15719
This commit is contained in:
parent
829c8416b6
commit
95f4d1eefe
|
@ -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
|
||||||
|
"Domain: "
|
||||||
(stringify-domain (car doms) (car rests) (car drests))
|
(stringify-domain (car doms) (car rests) (car drests))
|
||||||
|
"\nArguments: "
|
||||||
arguments-str
|
arguments-str
|
||||||
|
"\n"
|
||||||
(if expected
|
(if expected
|
||||||
(format "Result type: ~a~nExpected result: ~a~n"
|
(format "Result type: ~a\nExpected result: ~a\n"
|
||||||
(car rngs) (make-printable expected))
|
(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 ")]
|
||||||
|
[pdoms (map make-printable doms)])
|
||||||
|
(string-append
|
||||||
|
label
|
||||||
(stringify (if expected
|
(stringify (if expected
|
||||||
(map stringify-domain (map make-printable doms) rests drests rngs)
|
(map stringify-domain pdoms rests drests rngs)
|
||||||
(map stringify-domain (map make-printable doms) rests drests))
|
(map stringify-domain pdoms rests drests))
|
||||||
"~n\t")
|
nl+spc)
|
||||||
|
"\nArguments: "
|
||||||
arguments-str
|
arguments-str
|
||||||
|
"\n"
|
||||||
(if expected
|
(if expected
|
||||||
(format "Expected result: ~a~n" (make-printable 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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user