getOpts :: IO Opts
getOpts = do
    xs <- getArgs
    return $ process (Opts [] "out.icl") xs
    where
        process opts ("-o":o:xs) = process (opts { output = o }) xs
        process opts (x:xs) = process (opts { inputs = x:inputs opts }) xs
        process opts [] = opts
getOpts :: IO Opts
getOpts = do
    xs <- getArgs
    return $ process (Opts [] "out.icl") xs
    where
        process opts ("-o":o:xs) = process (opts { output = o }) xs
        process opts (x:xs) = process (opts { inputs = x:inputs opts }) xs
        process opts [] = opts
getOpts = do
    xs <- getArgs
    return $ process (Opts [] "out.icl") xs
    where
        process opts ("-o":o:xs) = process (opts { output = o }) xs
        process opts (x:xs) = process (opts { inputs = x:inputs opts }) xs
        process opts [] = opts