2 ms·
Eventlog traces are RTS calls wrapped into unsafePerformIO, you are right. The trace part of eventlog is optimized for, well, tracing and is very, very lightwei
by thesz 3y ago
Eventlog traces are RTS calls wrapped into unsafePerformIO, you are right. The trace part of eventlog is optimized for, well, tracing and is very, very lightweight. It is also safe from races, whereas simple unsafePerformIO (putStrLn $ "did you meant that? " ++ show (a,b,c)) is not.
In my opinion, eventlog traces make much better logging than almost anything I've seen.
Right now, developing with C++, I miss the power of Haskell's RTS.
- ReleaseCandidat 3y agoThe point I was trying to make was, that if all you want/need is a `putStr`, just use `unsafePerformIO`. Haskell's (GHC's) Eventlog is nice, but a binary format and not comparable to text output.