title: How to append user - input into a file Haskell
body: <p>I'm trying to append some input taken from the user, into a file. but I receive a strange error... which says that append can take only 2 parameters, and not 4.</p>
  
  <p>this is the code:</p>
  
  <pre><code>ame :: IO ()
  
  ame = do   
  
      putStr "Enter the file name: "
      name &lt;- getLine
      putStrLn "Do you want to add new records? "
      question &lt;- getLine
      if question == "yes" then do
          putStrLn "Enter your records:"
          newRec &lt;- getLine
          appendFile name ('\n':newRec)
  
          putStrLn "enter something new: "
          something &lt;- getLine
          appendFile name ('\n':something)
  
          putStrLn "enter something new again: "
          something2 &lt;- getLine
          appendFile name ('\n':something2)
          putStrLn "a"
      else
          putStr "b"
  </code></pre>
  
  <p>can someone help me with this?</p>