Skip to content

Instantly share code, notes, and snippets.

@joshcough
Forked from pchiusano/debug.hs
Last active August 29, 2015 14:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshcough/6168aed252e38a419418 to your computer and use it in GitHub Desktop.
Save joshcough/6168aed252e38a419418 to your computer and use it in GitHub Desktop.
Debugging trick in Haskell
module Foo where
import Debug.Trace
traceByteString :: String -> ByteString -> ByteString
traceByteString msg b | traceShow b False = undefined
traceByteString msg b = b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment