title: FParsec: how to omit `many` parser failures from error messages
body: <p>Consider this parser that converts digit strings to <code>int</code>s:</p>
  
  <pre><code>let toInt (s:string) = 
      match Int32.TryParse(s) with
      | (true, n) -&gt; preturn n
      | _         -&gt; fail "Number must be below 2147483648"
  
  let naturalNum = many1Chars digit &gt;&gt;= toInt &lt;?&gt; "natural number"
  </code></pre>
  
  <p>When I run it on non-numeric strings like <code>"abc"</code> it shows the correct error message:</p>
  
  <pre class="lang-none prettyprint-override"><code>Error in Ln: 1 Col: 1
  abc
  ^
  Expecting: natural number
  </code></pre>
  
  <p>But when I give it a numeric string exceeding the <code>int</code> range it gives the following counter-productive message:</p>
  
  <pre class="lang-none prettyprint-override"><code>Error in Ln: 1 Col: 17
  9999999999999999
                  ^
  Note: The error occurred at the end of the input stream.
  Expecting: decimal digit
  Other error messages:
    Number must be below 2147483648
  </code></pre>
  
  <p>The primary message <code>"Expecting: decimal digit"</code> makes no sense, because we have to many digits already.</p>
  
  <p>Is there a way to get rid of it and only show <code>"Number must be below 2147483648"</code>?</p>
  
  <hr/>
  
  <p>Full example:</p>
  
  <pre><code>open System
  open FParsec
  
  [&lt;EntryPoint&gt;]
  let main argv =
      let toInt (s:string) = 
          match Int32.TryParse(s) with
          | (true, n) -&gt; preturn n
          | _         -&gt; fail "Number must be below 2147483648"
  
      let naturalNum = many1Chars digit &gt;&gt;= toInt &lt;?&gt; "natural number"
  
      match run naturalNum "9999999999999999" with
      | Failure (msg, _, _) -&gt; printfn "%s" msg
      | Success (a, _, _)   -&gt; printfn "%A" a
  
      0
  </code></pre>