    --------------------------------------------------------------------
    -- |
    -- 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: " String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ String
    msg) IO () -> IO () -> IO ()
    forall a b. IO a -> IO b -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
    >> Handle -> IO ()
    hFlush Handle
    stdout
      | Bool
    otherwise     = () -> IO ()
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()