ref: 86b1b129b5c087b0833586855cdf82ab817a9bda
dir: /lib/System/Process.hs/
module System.Process(callCommand) where
import Prelude(); import MiniPrelude
import Control.Monad(when)
import Foreign.C.String
foreign import ccall "system" systemc :: CString -> IO Int
callCommand :: String -> IO ()
callCommand cmd = do
r <- withCAString cmd systemc
when (r /= 0) $
error $ "callCommand: failed " ++ show r ++ ", " ++ show cmd