CamelCase->hyphons pasted by certainty on Fri May 18 11:08:00 2012

(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)) "-")))

shorter version added by certainty on Fri May 18 11:10:40 2012

(define-for-syntax (hyphonize identifier)
  (string-join (map string-downcase (irregex-extract "[A-Z][^A-Z]*" identifier)) "-"))