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?
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 d
2 matches
Mail list logo