title: Why is Haskell reading the next line as an argument for the previous function?
body: <p>I am trying to run this extremely simple test program because I was having too many argument errors (reading the next line as an argument) in the code I was working with before.</p>
  <p>When I run this code:</p>
  <pre><code>main = do{
      putStrLn (&quot;test&quot;)
      print (&quot;works&quot;)
  }
  </code></pre>
  <p>I get the message:</p>
  <pre><code>• Couldn't match expected type ‘(a0 -&gt; IO ()) -&gt; [Char] -&gt; t’
                    with actual type ‘IO ()’
      • The function ‘putStrLn’ is applied to three arguments,
        but its type ‘String -&gt; IO ()’ has only one
        In a stmt of a 'do' block: putStrLn (&quot;test&quot;) print (&quot;works&quot;)
        In the expression: do putStrLn (&quot;test&quot;) print (&quot;works&quot;)
      • Relevant bindings include main :: t (bound at test.hs:1:1)
  </code></pre>
  <p>Am I missing something extremely simple here?</p>