getArgs
returns a list of string, not a string. You could use it like this:
module Main where
import System.Environment
main :: IO ()
main = do
args <- getArgs
putStrLn ("Hello" ++ (args !! 0) ++ (args !! 1))
Of course, this is only a demonstration of how to use getArgs
. In real program, you need to make sure you are given enough arguments before you actually use them.