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 ()
>
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
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
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 ()
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
>
5 matches
Mail list logo