[racket] for/and unhappiness with 'not' and the definition of Booleans?

From: John Clements (clements at brinckerhoff.org)
Date: Sat Aug 20 14:00:34 EDT 2011

I'm unable to get for/and to typecheck when the body is an application of 'not'. I've tried many variations on the following, without success:

#lang typed/racket

(for/and: : Any ([i (in-range 4)])
  (not (my-pred)))

(define (my-pred)


Type Checker: Expected True, but got Boolean in: (for/and: : Any ((i (in-range 4))) (not (my-pred)))

The error message suggests that the body must have type "True", though I suspect this is a consequence of if-splitting somehow.

Any suggestions or improvements to error messages appreciated.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4624 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20110820/e30ee146/attachment.p7s>

Posted on the users mailing list.