Skip to content

Instantly share code, notes, and snippets.

@vincenthz
Created February 15, 2017 10:40
Show Gist options
  • Save vincenthz/ea4cca692fd0aa85082f1e72f9246b99 to your computer and use it in GitHub Desktop.
Save vincenthz/ea4cca692fd0aa85082f1e72f9246b99 to your computer and use it in GitHub Desktop.
Debug haskell snippet
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