File: main.hs

package info (click to toggle)
haskell-mueval 0.9.3-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 136 kB
  • sloc: haskell: 419; sh: 85; makefile: 4
file content (17 lines) | stat: -rw-r--r-- 622 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-- TODO:
-- Need to add user switching. Perhaps using seteuid and setegid? See
-- <http://www.opengroup.org/onlinepubs/009695399/functions/seteuid.html> &
-- <http://www.opengroup.org/onlinepubs/009695399/functions/setegid.html>
module Main (main) where

import Mueval.Parallel
import Mueval.ArgsParse (interpreterOpts)
import System.Environment
import System.Exit

main :: IO ()
main = do args <- getArgs
          -- force parse errors in main's thread
          case interpreterOpts args of
              Left (n,s) -> putStrLn s >> if n then exitSuccess else exitFailure
              Right opts -> forkedMain $! opts