title: Type Resolution in Haskell: MegaParsec/ Parsing a single space
body: <p>If I look at the <a href="https://www.stackage.org/haddock/lts-9.17/megaparsec-5.3.1/Text-Megaparsec-Lexer.html" rel="nofollow noreferrer">documentation for <code>space</code></a> it suggests using <code>void spaceChar</code>.</p>
  
  <p>However, if I actually try:</p>
  
  <pre><code>x :: Parser ()
  x = void spaceChar
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>* Couldn't match type `Token s0' with `Char'
      arising from a use of `spaceChar'
    The type variable `s0' is ambiguous
  * In the first argument of `void', namely `spaceChar'
    In the expression: void spaceChar
    In an equation for `x': x = void spaceChar
  </code></pre>
  
  <p>I think the expression is correct, but there's something I need to do to convince the type checker. How do I get this to work?</p>