-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Library for interacting with console applications via pseudoterminals. -- -- Bindings to libexpect. @package libexpect @version 0.1.0 -- | Provides a thin wrapper for the FFI bindings to libexpect contained in -- System.Expect.ExpectBindings. module System.Expect.ExpectInterface -- | Denotes how a case's pattern is treated. data ExpectType -- | Match against pattern exactly. ExpExact :: ExpectType -- | Compile the pattern string to a regex and match. ExpRegex :: ExpectType -- | Pattern string is glob style. ExpGlob :: ExpectType ExpNull :: ExpectType -- | Defines a case to match against. data ExpectCase ExpectCase :: String -> ExpectType -> Int -> ExpectCase -- | Pattern to match against. expectPattern :: ExpectCase -> String -- | Type of pattern contained in the case. expectType :: ExpectCase -> ExpectType -- | The value to return if the case is matched. expectValue :: ExpectCase -> Int -- | Proc created by spawnExpect. Contains both the CFile pointer and a -- Haskell handle, so the translation needs only be done once. data ExpectProc ExpectProc :: Ptr CFile -> Handle -> ExpectProc -- | Gets the pointer to the expect process file handle. expectFilePtr :: ExpectProc -> Ptr CFile -- | Gets a Handle to the expect process. expectHandle :: ExpectProc -> Handle -- | Child process does not echo output to stdout. muteExpect :: IO () -- | Child process echoes output to stdout. unmuteExpect :: IO () -- | Spawn a new expect process, running a specified program. spawnExpect :: String -> IO ExpectProc expectCases :: ExpectProc -> [ExpectCase] -> IO (Maybe Int) -- | Expect a single case with a type of ExpExact. expectExact :: ExpectProc -> String -> IO (Maybe Int) -- | Expect a single case with a type of ExpExact. expectRegex :: ExpectProc -> String -> IO (Maybe Int) -- | Expect multiple cases of a given type. expectMultiple :: ExpectProc -> [String] -> ExpectType -> IO (Maybe Int) -- | Send a line of input to the process. sendLine :: ExpectProc -> String -> IO () module System.Expect