-------------------------------------------------------------------- -- | -- Module : Network.Curl.Debug -- Copyright : (c) Galois, Inc. 2008-2009 -- License : BSD3 -- -- Maintainer: Sigbjorn Finne <sof@galois.com> -- Stability : provisional -- Portability: -- -- Debug hooks module Network.Curl.Debug (debug) where import System.IO debugging :: Bool debugging :: Bool debugging = Bool False debug :: String -> IO () debug :: String -> IO () debug String msg | Bool debugging = String -> IO () putStrLn (String "DEBUG: " forall a. [a] -> [a] -> [a] ++ String msg) forall (m :: * -> *) a b. Monad m => m a -> m b -> m b >> Handle -> IO () hFlush Handle stdout | Bool otherwise = forall (m :: * -> *) a. Monad m => a -> m a return ()