Extracting an integer command-line argument and printing a sum of numbers up to that limit
This is the code you're looking for:

main = do
  args &lt;- getArgs
  let arg1 = head args
  let n = (read arg1) :: Int
  putStrLn . show $ sum [1..n]


Think of the &lt;- operator as "extract". It "pulls" a value out of a monad. 

But once you've pulled args out of the IO monad, you've now got a pure list of strings. It's not in the IO monad, so you can't extract from it. let instead just does a pure binding like you're used to in non-monadic code, which is what you need here.