The contract extension of Typed Racket are still pending Sam’s review. 


> On Jul 1, 2017, at 12:41 PM, Zelphir Kaltstahl <[email protected]> 
> wrote:
> 
> I tried some simple examples of Typed Racket recently and then I thought I 
> could try some things with contracts too.
> 
> However, I do not seem to be able to contract-out any Typed Racket struct. 
> For example:
> 
> 
> ~~~
> #lang typed/racket
> 
> (struct WordMetadata
>  ([id : String]
>   [learned : Boolean]
>   [description : String]))
> 
> (provide (contract-out
>          [struct WordMetadata
>            (id string?)
>            (learned boolean?)
>            (description string?)]))
> ~~~
> 
> 
> would underline the parenthesis immediately before contract-out, telling me 
> that:
> 
> 
> ~~~
> contract-out: not a provide sub-form
> ~~~
> 
> 
> The simple examples in the docs always use:
> 
> 
> ~~~
> #lang racket
> ~~~
> 
> 
> After a lot of wondering what I am doing wrong, I am guessing, that because 
> Typed Racket creates its own contracts for the types of the structs, I cannot 
> put contracts on them and contract-out does not accept such structs, as 
> opposed to structs of #lang racket.
> 
> However, I am only guessing. (Is this correct?)
> 
> And if if is correct or at least something in that direction, does it even 
> make sense to combine Typed Racket with contracts, or am I maybe trying to do 
> something which does not really make sense?
> 
> -- 
> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to