shithub: MicroHs

ref: e467aff8da3a13f7faac971b3d0752ecd8d6e348
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