In this example, is it ok for `f`'s contract to be able to inspect argument 
`x`? It's originally sealed with `α`, and the contract takes advantage of 
the unsealing in `g`'s domain to inspect it. Sure the contract is a 
separate party than `f`, but is this ok?

(define/contract f
  (parametric->/c
   (α)
   (α
    ((and/c α (λ (x) (printf "inspect x: ~a~n" x))) . -> . any/c) . -> . 
any/c))
  (λ (x g) (g x)))

(f 42 add1)

On Thursday, January 18, 2018 at 8:53:03 AM UTC-5, Robby Findler wrote:
>
> On Thu, Jan 18, 2018 at 7:43 AM, Phil Nguyen <philngu...@gmail.com 
> <javascript:>> wrote: 
> > It looks like a more general issue we have is that arguments are 
> sometimes 
> > unexpectedly unsealed and prone to inspection by arbitrary code in 
> > contracts, like `->i`'s range or a second conjunct to `and/c`. 
>
> Well, they are supposed to be unwrapped when they pass "out". The ->i 
> thing is a more general question of "where is 'out', anyway?" and I 
> put to you that this isn't trivial (there are multiple papers on the 
> topic already). 
>
> Can you explain more what you mean about and/c, however? 
>
> Robby 
>

-- 
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