shithub: MicroHs

ref: e58eace5b4c5f50e1e1a9b6dd0f8e04122478512
dir: /lib/System/Process.hs/

View raw version
module System.Process(callCommand) where
import Prelude
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