shithub: MicroHs

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