From 5214b06a860ed0151ce094c951a004ea17b9ea6c Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Wed, 27 Jan 2016 08:47:14 -0600 Subject: [PATCH] use chaperone-of? instead of eq? to find list?, null?, and pair? --- racket/collects/racket/contract/private/guts.rkt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/racket/collects/racket/contract/private/guts.rkt b/racket/collects/racket/contract/private/guts.rkt index 7ed2f71e91..bf6b8157ce 100644 --- a/racket/collects/racket/contract/private/guts.rkt +++ b/racket/collects/racket/contract/private/guts.rkt @@ -299,12 +299,12 @@ [(contract-struct? x) #f] ;; this has to come first, since some of these are procedure?. [(and (procedure? x) (procedure-arity-includes? x 1)) (cond - [(eq? x null?) list/c-empty] - [(eq? x list?) + [(chaperone-of? x null?) list/c-empty] + [(chaperone-of? x list?) (unless listof-any (error 'coerce-contract/f::listof-any "too soon!")) listof-any] - [(eq? x pair?) + [(chaperone-of? x pair?) (unless consc-anyany (error 'coerce-contract/f::consc-anyany "too soon!")) consc-anyany]