shithub: MicroHs

ref: 1db7ac527ec413001b7a594269e20b57f65d5a41
dir: /lib/System/Process.hs/

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