-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | An SMT-LIB backend running solvers as external processes.
--
-- This library implements an SMT-LIB backend (in the sense of the
-- smtlib-backends package) which runs solvers as external processes.
@package smtlib-backends-process
@version 0.3
-- | A module providing a backend that launches solvers as external
-- processes.
module SMTLIB.Backends.Process
data Config
Config :: String -> [String] -> StdStream -> Config
-- | The command to call to run the solver.
[exe] :: Config -> String
-- | Arguments to pass to the solver's command.
[args] :: Config -> [String]
-- | How to handle std_err of the solver.
[std_err] :: Config -> StdStream
data Handle
Handle :: ProcessHandle -> Handle -> Handle -> Maybe Handle -> Handle
-- | The process running the solver.
[process] :: Handle -> ProcessHandle
-- | The input channel of the process.
[hIn] :: Handle -> Handle
-- | The output channel of the process.
[hOut] :: Handle -> Handle
-- | The error channel of the process.
[hMaybeErr] :: Handle -> Maybe Handle
-- | By default, use Z3 as an external process and ignores log messages.
defaultConfig :: Config
-- | Run a solver as a process.
new :: Config -> IO Handle
-- | Cleanup the process' resources, terminate it and wait for it to
-- actually exit.
close :: Handle -> IO ()
-- | Create a solver process, use it to make a computation and close it.
with :: Config -> (Handle -> IO a) -> IO a
-- | Make the solver process into an SMT-LIB backend.
toBackend :: Handle -> Backend
data StdStream
-- | Inherit Handle from parent
Inherit :: StdStream
-- | Use the supplied Handle
UseHandle :: Handle -> StdStream
-- | Create a new pipe. The returned Handle will use the default
-- encoding and newline translation mode (just like Handles
-- created by openFile).
CreatePipe :: StdStream
-- | Close the stream's file descriptor without passing a Handle. On POSIX
-- systems this may lead to strange behavior in the child process because
-- attempting to read or write after the file has been closed throws an
-- error. This should only be used with child processes that don't use
-- the file descriptor at all. If you wish to ignore the child process's
-- output you should either create a pipe and drain it manually or pass a
-- Handle that writes to /dev/null.
NoStream :: StdStream