Created
May 10, 2020 11:22
-
-
Save ethercrow/aa7fecc040c6f320199f82af6b1df0c0 to your computer and use it in GitHub Desktop.
Debug printing of GHC eventlogs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
-- stack --resolver lts-15.11 --install-ghc script --compile --package ghc-events | |
{-# language lambdacase #-} | |
import ghc.rts.events | |
import system.environment | |
main :: io () | |
main = do | |
[f] <- getargs | |
readeventlogfromfile f >>= \case | |
right l -> putstrln $ ppeventlog l | |
left err -> putstrln err |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment