Created
February 15, 2017 10:40
-
-
Save vincenthz/ea4cca692fd0aa85082f1e72f9246b99 to your computer and use it in GitHub Desktop.
Debug haskell snippet
This file contains 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
import qualified Data.ByteArray.Encoding as BD | |
import Debug.Trace | |
bytedump n f a = trace ("[HS] " ++ n ++ " " ++ toHex (f a)) a | |
where toHex = (show :: ByteString -> String) . BD.convertToBase BD.Base16 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment