cryptol-3.0.0: Cryptol: The Language of Cryptography

Safe Haskell | Safe-Inferred
Language | Haskell2010

Cryptol.Utils.Logger

Description

A simple system so that the Cryptol driver can communicate with users (or not).

Synopsis

- data Logger
- stdoutLogger :: Logger
- stderrLogger :: Logger
- handleLogger :: Handle -> Logger
- quietLogger :: Logger
- funLogger :: (String -> IO ()) -> Logger
- logPutStr :: Logger -> String -> IO ()
- logPutStrLn :: Logger -> String -> IO ()
- logPrint :: Show a => Logger -> a -> IO ()

# Documentation

data Logger Source #

A logger provides simple abstraction for sending messages.

#### Instances

Instances details

NFData Logger Source # |
Instance details Defined in Cryptol.Utils.Logger Methods rnf :: Logger -> () Source #

stdoutLogger :: Logger Source #

Log to stdout.

stderrLogger :: Logger Source #

Log to stderr.

handleLogger :: Handle -> Logger Source #

Log to the given handle.

quietLogger :: Logger Source #

A logger that ignores all messages.

funLogger :: (String -> IO ()) -> Logger Source #

Just use this function for logging.

logPutStr :: Logger -> String -> IO () Source #

Send the given string to the log.

logPutStrLn :: Logger -> String -> IO () Source #

Send the given string with a newline at the end.

logPrint :: Show a => Logger -> a -> IO () Source #

Send the given value using its `Show` instance. Adds a newline at the end.