1 {-# LANGUAGE OverloadedStrings #-}
11 , printf -- TODO: delete me
16 import System.IO.Unsafe
19 {-# NOINLINE logHandle #-}
20 -- TODO(bernhard): use MVar if threaded
22 logHandle = unsafePerformIO $ openFile "mate.log" WriteMode
24 {-# INLINE mateDEBUG #-}
28 {-# INLINE printString #-}
29 printString :: String -> String -> IO ()
30 printString prefix str = if mateDEBUG
31 then hPutStr logHandle . (++) prefix $ str
35 printfJit, printfBb, printfMp, printfCp, printfStr, printfInfo :: String -> IO ()
38 -- http://stackoverflow.com/questions/12123082/function-composition-with-text-printf-printf
40 printfJit = printString "Jit: "
41 printfBb = printString "Bb: "
42 printfMp = printString "Mp: "
43 printfCp = printString "Cp: "
44 printfStr = printString "Str: "
45 printfInfo = printString "Info: "