yi-core-0.19.4: Yi editor core library

License | GPL-2
Maintainer | yi-devel@googlegroups.com
Stability | experimental
Portability | portable
Safe Haskell | None
Language | Haskell2010

Extensions

- Cpp
- OverloadedStrings
- FlexibleContexts
- LambdaCase

Yi.Debug

Description

Debug utilities used throughout Yi.

Synopsis

- initDebug :: FilePath -> IO ()
- trace :: Text -> a -> a
- traceM :: Monad m => Text -> a -> m a
- traceM_ :: Monad m => Text -> m ()
- logPutStrLn :: MonadBase IO m => Text -> m ()
- logError :: MonadBase IO m => Text -> m ()
- logStream :: Show a => Text -> Chan a -> IO ()
- error :: Text -> a

# Documentation

initDebug :: FilePath -> IO () Source #

Set the file to which debugging output should be written. Though this is called initDebug. Debugging output is not created by default (i.e., if this function is never called.) The target file can not be changed, nor debugging disabled.

trace :: Text -> a -> a Source #

Outputs the given string before returning the second argument.

traceM :: Monad m => Text -> a -> m a Source #

Traces `x` and returns `y`.

traceM_ :: Monad m => Text -> m () Source #

Like traceM, but returns ().

logPutStrLn :: MonadBase IO m => Text -> m () Source #

logError :: MonadBase IO m => Text -> m () Source #

logStream :: Show a => Text -> Chan a -> IO () Source #

error :: Text -> a Source #