Skip to content

Commit 762c437

Browse files
committed
improve warning message slightly
1 parent 9def040 commit 762c437

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

typed-racket-lib/typed-racket/private/type-contract.rkt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,12 @@
547547
[(Opaque: p?)
548548
(when exact?
549549
(eprintf
550-
"warning: Opaque predicates cannot be used as exact decisions yes/no:\n predicate: ~s\n"
550+
(string-append
551+
"warning: cannot safely generate exact predicate for Opaque type\n"
552+
" consider generating a positive-predicate instead\n"
553+
" type: ~a\n"
554+
" pred: ~s\n")
555+
type
551556
(syntax-e p?)))
552557
(flat/sc #`(flat-named-contract (quote #,(syntax-e p?)) #,p?))]
553558
[(Continuation-Mark-Keyof: t)

0 commit comments

Comments
 (0)