rest-gen/Haskell: Escape invalid characters in names