home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / hugs_1 / !Hugs_lib_System < prev    next >
Encoding:
Text File  |  1996-08-12  |  1.2 KB  |  34 lines

  1. -----------------------------------------------------------------------------
  2. -- Standard Library: System operations
  3. --
  4. -- Warning: the implementation of these functions in Hugs 1.3 is very weak.
  5. -- The functions themselves are best suited to uses in compiled programs,
  6. -- and not to use in an interpreter-based environment like Hugs.
  7. --
  8. -- Suitable for use with Hugs 1.3.
  9. -----------------------------------------------------------------------------
  10.  
  11. module System where
  12.  
  13. data ExitCode = ExitSuccess | ExitFailure Int
  14.                 deriving (Eq, Ord, Read, Show)
  15.  
  16. getArgs      :: IO [String]
  17. getArgs       = return []       -- no args available
  18.  
  19. getProgName  :: IO String
  20. getProgName   = return "Hugs"   -- provides a way for executing Haskell
  21.                                 -- programs to test if they are running
  22.                                 -- under Hugs ...
  23.  
  24. getEnv       :: String -> IO String
  25. getEnv        = error "getEnv function is not implemented in Hugs"
  26.  
  27. system       :: String -> IO ExitCode
  28. system        = error "system function is not implemented in Hugs"
  29.  
  30. exitWith     :: ExitCode -> IO a
  31. exitWith      = error "exitWith function is not implemented in Hugs"
  32.  
  33. -----------------------------------------------------------------------------
  34.