Maintaining registration lists added by sjamaan on Mon Jul 1 14:02:45 2019

(begin-for-syntax
 (define registered-types-at-expansion-time '(test)))

(define registered-types-at-runtime '())

(define-syntax register-type
  (ir-macro-transformer
   (lambda (e i c)
     (set! registered-types-at-expansion-time
           (cons (strip-syntax (cadr e)) registered-types-at-expansion-time))
     `(begin
        (set! registered-types-at-runtime
              (cons ',(strip-syntax (cadr e)) registered-types-at-runtime))))))

(register-type my-type)

;; Then, in the REPL:
(begin-for-syntax (print registered-types-at-expansion-time)) => (my-type test)

(print registered-types-at-runtime) => (my-type)