[plt-scheme] Contract Error Message
On Mon, Jul 20, 2009 at 2:40 PM, David Van Horn<dvanhorn at ccs.neu.edu> wrote:
> Carl Eastlund wrote:
>>
>> What you wrote was a perfectly acceptable contract that functioned
>> perfectly, except that it wasn't the one you meant it to be. What
>> alternate behavior would you propose?
>
> Actually, Paulo broke the contract on or/c, so this could have a better
> error message without changes to the contract language.
>
> David
Not according to the documentation I find here:
http://docs.plt-scheme.org/reference/contracts.html
Constants are perfectly acceptable contracts. If the contract?
function doesn't accept them, then either contract? needs to start
accepting them or or/c needs to be documented with a more general
contract. But values like #f, 'foo, or 5 are usable with most
contract primitives.
--Carl