Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type SandboxStateRef = IORef SandboxState
- newtype Sandbox a = Sandbox {}
- newtype StMSandbox a = StMSandbox {
- runStMSandbox :: StM (ExceptT String (ReaderT SandboxStateRef IO)) a
- runSandbox :: Sandbox a -> SandboxStateRef -> IO (Either String a)
- errorHandler :: String -> IO a
- runSandbox' :: SandboxStateRef -> Sandbox a -> IO a
- data SandboxState = SandboxState {}
- data SandboxedProcess = SandboxedProcess {}
- data Capture
- data SandboxedProcessInstance
- get :: Sandbox SandboxState
- put :: SandboxState -> Sandbox SandboxState
- pretty :: SandboxState -> String
- header :: SandboxState -> String
- footer :: String
- newSandboxState :: String -> FilePath -> IO SandboxStateRef
- registerProcess :: String -> FilePath -> [String] -> Maybe Int -> Maybe Capture -> Sandbox SandboxedProcess
- isValidProcessName :: String -> Bool
- getProcess :: String -> Sandbox SandboxedProcess
- updateProcess :: SandboxedProcess -> Sandbox SandboxedProcess
- secondInµs :: Int
- setFile' :: String -> String -> SandboxState -> IO (FilePath, SandboxState)
- bufferSize :: Int
- hReadWithTimeout :: Handle -> Int -> Sandbox ByteString
- sendToPort :: String -> String -> Int -> Sandbox String
- getNewPort :: String -> Sandbox PortNumber
- isBindable :: PortNumber -> IO Bool
- startProcess :: SandboxedProcess -> Sandbox SandboxedProcess
- formatCommandLine :: String -> [String] -> String
- stopProcess :: SandboxedProcess -> Sandbox SandboxedProcess
- getAvailablePids :: Sandbox [ProcessID]
- cleanUpProcesses :: Sandbox ()
- hSignalProcess :: Signal -> ProcessHandle -> IO ()
- killProcess :: ProcessHandle -> IO ()
- hGetProcessID :: ProcessHandle -> IO ProcessID
- interactWithProcess :: SandboxedProcess -> String -> Int -> Sandbox String
- getProcessInputHandle :: SandboxedProcess -> Sandbox Handle
- getProcessCapturedOutputHandle :: SandboxedProcess -> Sandbox Handle
- getProcessBinary :: SandboxedProcess -> Sandbox FilePath
- findExecutables :: [FilePath] -> IO [FilePath]
- tryBinary :: FilePath -> IO (Maybe FilePath)
- getProcessCandidateBinaries :: SandboxedProcess -> [FilePath]
- expand :: String -> IO String
- whenM :: Monad m => m Bool -> m () -> m ()
- setVariable :: Serialize a => String -> a -> Sandbox a
- checkVariable :: String -> Sandbox Bool
- getVariable :: Serialize a => String -> a -> Sandbox a
- unsetVariable :: String -> Sandbox ()
- isVerbose :: Sandbox Bool
- verbosityKey :: String
- isCleanUp :: Sandbox Bool
- cleanUpKey :: String
- displayBanner :: Sandbox ()
- installSignalHandlers :: Sandbox ()
- data SandboxSeed
- data SandboxTestOptions = SandboxTestOptions {}
- putOptions :: SandboxTestOptions -> Sandbox ()
- getOptions :: Sandbox (Maybe SandboxTestOptions)
- optionsVariable :: String
Documentation
type SandboxStateRef = IORef SandboxState Source
newtype StMSandbox a Source
StMSandbox | |
|
runSandbox :: Sandbox a -> SandboxStateRef -> IO (Either String a) Source
errorHandler :: String -> IO a Source
runSandbox' :: SandboxStateRef -> Sandbox a -> IO a Source
data SandboxState Source
data SandboxedProcess Source
put :: SandboxState -> Sandbox SandboxState Source
pretty :: SandboxState -> String Source
header :: SandboxState -> String Source
newSandboxState :: String -> FilePath -> IO SandboxStateRef Source
registerProcess :: String -> FilePath -> [String] -> Maybe Int -> Maybe Capture -> Sandbox SandboxedProcess Source
isValidProcessName :: String -> Bool Source
secondInµs :: Int Source
setFile' :: String -> String -> SandboxState -> IO (FilePath, SandboxState) Source
bufferSize :: Int Source
hReadWithTimeout :: Handle -> Int -> Sandbox ByteString Source
getNewPort :: String -> Sandbox PortNumber Source
isBindable :: PortNumber -> IO Bool Source
formatCommandLine :: String -> [String] -> String Source
cleanUpProcesses :: Sandbox () Source
hSignalProcess :: Signal -> ProcessHandle -> IO () Source
killProcess :: ProcessHandle -> IO () Source
interactWithProcess :: SandboxedProcess -> String -> Int -> Sandbox String Source
findExecutables :: [FilePath] -> IO [FilePath] Source
Sets a custom variable in the sandbox monad.
Checks that a custom sandbox variable is set.
Returns the value of a previously set sandbox variable (or a provided default value if unset)
displayBanner :: Sandbox () Source
data SandboxSeed Source
putOptions :: SandboxTestOptions -> Sandbox () Source