Yes, this is correct. But it is not a problem for Typed Racket, which was
designed to accommodate precisely this style of programming:
#lang typed/racket
(define-type [Option P] (U P False))
(define-type SPath String)
(: file-exists-> (-> SPath [Option SPath]))
(define (file-exists-> name)
Perhaps this would be a hassle for Typed-Racket maintainers, but there are many
places where standard Racket library functions return boolean. However, given
the non-false nature of almost everything, certainly the code could be doubly
useful and half the size while retaining boolean compatibil
2 matches
Mail list logo