(define-for-syntax (hyphonize identifier) (let ((parts (irregex-extract "[A-Z][^A-Z]+" identifier))) (string-join (map string-downcase (if (null? parts) (list identifier) parts)) "-")))