;; remap impc:ir:poly-print-all
(define impc:ti:polytype-pretty-print
(lambda (polytype-name)
(let ((candidates (impc:ti:get-polytype-candidate-list polytype-name)))
(and candidates
(begin
(print "Polymorphic types for ")
(print-with-colors *impc:compiler:pretty-print-name-color* 'default #t (print polytype-name))
(println)
(for-each (lambda (func-vector)
;; perhaps this should (regex:split (vector-ref func-vector 0) "_poly_") to clean the generic ones up a bit?
(print " ")
(print-with-colors *impc:compiler:pretty-print-code-color* 'default #f (print (vector-ref func-vector 0)))
(print ": ")
(print-with-colors *impc:compiler:pretty-print-type-color* 'default #f (print (impc:ir:pretty-print-type (vector-ref func-vector 1))))
(println))
candidates))))))