title: Matching command line args
body: <p>Starting out learning F#.  Want to make a simple program that just tells me what it found in the command line args.  I have:</p>
  
  <pre><code>[&lt;EntryPoint&gt;]
  let main argv = 
      printfn "%A" argv
      match argv with
      | []  -&gt; 42
      | _ -&gt; 43
  </code></pre>
  
  <p>But this gives errors.  If I hover over argv I see:</p>
  
  <blockquote>
    <p>val argv : string[]</p>
  </blockquote>
  
  <p>which is what I would have expected (a list of strings).  However the first match expression has an error:</p>
  
  <blockquote>
    <p>Error 1   This expression was expected to have type
        string []     but here has type
        'a list</p>
  </blockquote>
  
  <p>Basically I just want to match on an empty argument list (an empty list of strings).  What's the right way to do that?</p>
  
  <p>I should add: I don't just want a solution (though that would be nice).  I also want to understand what the compiler is looking for here that I'm not giving it.</p>