title: The inferred type of active recognizer - one is option and another is not
body: <p>I have the following code. For the last two <code>match</code>, the first <code>period</code> has type of <code>DateTime option</code> and the second one has type of <code>int</code>. Why the second one doesn't have option?</p>
  
  
  
  <pre class="lang-ml prettyprint-override"><code>let (|Integer|_|) (str: string) =
     let mutable intvalue = 0
     if Int32.TryParse(str, &amp;intvalue) then Some(intvalue)
     else None
  
  let (|DateyyMM|) (str: string) =
      let mutable date = new DateTime()
      if DateTime.TryParseExact(str, 
                                "yyyyMM", 
                                Globalization.DateTimeFormatInfo.InvariantInfo, 
                                Globalization.DateTimeStyles.None, 
                                &amp;date) 
      then Some(date)
      else None
  
  let (|ParseRegex|_|) regex str =
     let m = Regex(regex).Match(str)
     if m.Success
     then Some (List.tail [ for x in m.Groups -&gt; x.Value ])
     else None
  
  .....
  match url with
  | ParseRegex "....." [DateyyMM period] -&gt; //period type is DateTime option
  ......
  
  match downloadLink.Url with
  | ParseRegex "....." [name; Integer period] -&gt; // period type is int
  ......
  </code></pre>