summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/lib/libposix/posix013.hs
blob: b78930b44e0e3aa6d158eec795d5458eb106a41f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--!! Querying for system information.
module Main(main) where

import Posix

main = do
  sid <- getSystemID
  let
   info =
    [ "Node Name: "   , nodeName sid
    , "OS: "	      , systemName sid
    , "Arch: "        , machine sid
    , "Version: "     , version sid
    , "Release: "     , release sid
    ]
  putStrLn2 info

putStrLn2 :: [String] -> IO ()
putStrLn2 []  = return ()
putStrLn2 [x] = putStrLn x
putStrLn2 (x1:x2:xs) = putStrLn (x1++x2) >> putStrLn2 xs