packages feed

hsshellscript-3.3.4: test/_exit.chs

import HsShellScript
--import Foreign.C


main = _exit 666


{-
main = do 
   _exit (0::Int)
   return ()
-}


{-
_exit :: Int                    -- ^ Exit code
      -> IO a                   -- ^ Never returns
_exit ec = do
   _exit_prim (fromIntegral ec)
   error "Impossible error" -- never reached

foreign import ccall safe "HsShellScript/ProcErr.chs.h _exit"
  _exit_prim :: (CInt -> (IO ()))
-}


--_exit :: Int                    -- ^ Exit code
--      -> IO a                   -- ^ Never returns
--_exit ec = do
--   _exit_prim (fromIntegral ec)
--   error "Impossible error" -- never reached, only for the type checker


--foreign import ccall safe "HsShellScript/ProcErr.chs.h _exit"
--  _exit_prim :: (CInt -> (IO ()))