Re: [racket-users] Contracts not enforced with serial-lambda

2017-03-29 Thread Matthew Flatt
This example and variants exposed multiple problems with the implementation of chaperones, and I've pushed repairs. At Wed, 29 Mar 2017 09:12:25 -0600, Matthew Flatt wrote: > It's also not really contracts, but chaperones: > > #lang racket/base > > (define kwstruct-add1 >(let () >

Re: [racket-users] Contracts not enforced with serial-lambda

2017-03-29 Thread Matthew Flatt
It's also not really contracts, but chaperones: #lang racket/base (define kwstruct-add1 (let () (struct the-struct () #:property prop:procedure (make-keyword-procedure (λ (kws kw-values _ i) "broken"))) (the-struct))) ((chaperone-procedure kwstruct-add1

Re: [racket-users] Contracts not enforced with serial-lambda

2017-03-29 Thread Sam Tobin-Hochstadt
I think the problem is actually in the implementation of `chaperone-procedure` for keywords. This program has the same behavior: #lang racket (require (prefix-in k: '#%kernel)) (define kwstruct-add1 (let () (struct the-struct () #:property prop:procedure (make-keyword-procedure

Re: [racket-users] Contracts not enforced with serial-lambda

2017-03-29 Thread Jay McCarthy
This is actually a problem in racket/contract with applicable structs where prop:procedure is a keyword procedure. This file shows the development --- http://pasterack.org/pastes/361 --- and the simple thing that breaks is: #lang racket (define kwstruct-add1 (let () (struct the-struct ()

[racket-users] Contracts not enforced with serial-lambda

2017-03-27 Thread Philip McGrath
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 >