On 2015-06-12 17:30:42 -0700, 'John Clements' via users-redirect wrote: > (define-type (HuffJsexpr T) > (U T (HashTable Symbol HuffJsexpr)))
The variant that Alex mentioned should work. I think the only restrictions on recursive types that TR enforces are that it has to be (A) productive, in that there's a real type constructor in the recursive body, and (B) it can't be polymorphic recursive. (A) implies something like (Rec X (U Integer X)) isn't allowed. U doesn't count as a type constructor for this purpose. (B) implies you can't have a type definition like: (define-type (MyType T) (U Integer (MyType (Listof T)))) where the instantiated type changes. Cheers, Asumu -- 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.

