
I'm interested to know why a string translating preprocessor doesn't exist for haskell. It seems to me that it would alleviate printf and regex like problems in an convenient, elegant and type-safe manner.
An example of this I came across recently was the ocaml printf statement:
# Printf.printf "roar";; roar- : unit = ()
# Printf.printf "numbers %d %d" 11 23;; numbers 11 23- : unit = ()
# Printf.printf "a number %d" "word";; This expression has type string but is here used with type int
You can see logically how this might work in haskell, compile time evaluation would translate the string into the appropriate native expressions before the statements type is evaluated.
Incidentally, I've written a small functional pearl about implementing printf in Haskell, see http://www.informatik.uni-bonn.de/~ralf/publications.html#J11 Cheers, Ralf