Re: [racket-users] printing structures in typed Racket

2020-05-15 Thread Sam Tobin-Hochstadt
Generics are not supported yet; you need to use structure type properties, like this: #lang typed/racket/base (: parameter-print : Any Output-Port Any -> Any) (define (parameter-print v p b) (fprintf p "hi\n")) (struct parameter ([type : String] [name : Symbol] [len : (Option String)] [const?

[racket-users] printing structures in typed Racket

2020-05-15 Thread Hendrik Boom
How does one provide a method to print strutures in typed Racket? (struct parameter ([type : XML] [name : Symbol] [len : (Option String)] [const? : Boolean] [stars : Integer]) #:methods gen:custom-write [(define write-proc parameter-print)] ) seems not to work. But something like this