fork download
  1. {-# LANGUAGE TemplateHaskell #-}
  2.  
  3. -- Import our template "printf"
  4. import PrintF (printf)
  5.  
  6. -- The splice operator $ takes the Haskell source code
  7. -- generated at compile time by "printf" and splices it into
  8. -- the argument of "putStrLn".
  9. main = do
  10. putStrLn $ $(printf "Hello %s %%x%% %d %%x%%") "World" 12
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.hs:4:7:
    Could not find module `PrintF':
      Use -v to see a list of the files searched for.
stdout
Standard output is empty