I've been playing around with trying to attach contracts to serializable
procedures created with serial-lambda. What I've been trying to do hasn't
been working, and I've also come across some surprising behavior. For
example, this program:

> #lang racket
> (require web-server/lang/serial-lambda
>          racket/serialize
>          )
> (define/contract serial-add1
>   (-> number? number?)
>   (serial-lambda (i)
>     "broken"))
> (serial-add1 "bad arg")

prints "broken", rather than raising an error for either the domain part or
the range part of the contract (neither of which pass).

I was expecting to potentially run into trouble with things like
deserialization, but I'm not at all sure why the contract in this simple
example isn't enforced.

Thanks,
Philip

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to