title: How to parse a line using Parsec?
body: <p>I'm using the parsing library Parsec to parse some text.
  I simply need to parse lines, which are strings of arbitrary characters, ending with a '\n' or an eof when its at the end of the string.
  When calling <code>parseHS'</code> I get the complaint that <code>Exception: Text.ParserCombinators.Parsec.Prim.many: combinator 'many' is applied to a parser that accepts an empty string.</code>.</p>
  
  <pre><code>parseHS' :: String -&gt; Either ParseError [String]
  parseHS' input = parse hsFile' "(unknown)" input
  
  hsFile' :: GenParser Char st [String]
  hsFile' = do
      many1 line
  
  line :: GenParser Char st String
  line = do
      result &lt;- many (noneOf "\n")
      optional newline
      return result
  </code></pre>
  
  <p>How could this be achieved correctly?</p>