diff --git a/racket/collects/racket/contract/private/guts.rkt b/racket/collects/racket/contract/private/guts.rkt index 87706ac17d..2e6b454020 100644 --- a/racket/collects/racket/contract/private/guts.rkt +++ b/racket/collects/racket/contract/private/guts.rkt @@ -108,10 +108,21 @@ (define (contract? x) (and (coerce-contract/f x) #t)) -(define (flat-contract? x) - (let ([c (coerce-contract/f x)]) - (and c - (flat-contract-struct? c)))) +(define (flat-contract? x) + (or (and (procedure? x) (procedure-arity-includes? x 1)) + (null? x) + (boolean? x) + (symbol? x) + (keyword? x) + (char? x) + (bytes? x) + (string? x) + (number? x) + (regexp? x) + (byte-regexp? x) + (let ([c (coerce-contract/f x)]) + (and c + (flat-contract-struct? c))))) (define (chaperone-contract? x) (let ([c (coerce-contract/f x)])