Re: [racket-users] warnings for requiring opaque types in typed racket 6.6

2016-08-24 Thread Matthew Eric Bassett
On 08/24/2016 02:28 PM, Alex Knauth wrote: > That's the short-term solution. A better solution would be for typed racket > to implement a different version of #:opaque that would actually wrap the > values in opaque structs when they flow from untyped-to-typed and unwrap them > when they flow

Re: [racket-users] warnings for requiring opaque types in typed racket 6.6

2016-08-24 Thread Matthew Eric Bassett
thank you for your reply, Alex. That was informative and helpful. On 08/19/2016 02:56 PM, Alex Knauth wrote: > So to work around that, you can use `define-new-subtype` along with > `unsafe-require/typed`. > > #lang typed/racket > (require typed/racket/unsafe) > (define-new-subtype My-Type

Re: [racket-users] warnings for requiring opaque types in typed racket 6.6

2016-08-19 Thread Alex Knauth
> On Aug 19, 2016, at 8:05 AM, Matthew Eric Bassett wrote: > Is there a "correct" way to handle these sorts of cases? The "correct" way right now is to give typed racket the information it needs for chaperoning on it, and unfortunately that means using the `#:struct`

[racket-users] warnings for requiring opaque types in typed racket 6.6

2016-08-19 Thread Matthew Eric Bassett
Hi all, I note that Racket 6.6 now issues warnings for certain generated contracts in typed/untyped interactions. In particular, these warnings come up when requiring an untyped file from a typed file. For example, say I have test.rkt: - #lang racket (define my-type (let ()