title: How to simulate a "click" event in Haskell
body: <p>I want to internally click a button in Haskell, and I'm using (maybe I'm wrong)
  the function dispatchEvent_ <a href="https://hackage.haskell.org/package/jsaddle-dom-0.9.4.1/docs/JSDOM-Generated-EventTarget.html" rel="nofollow noreferrer">https://hackage.haskell.org/package/jsaddle-dom-0.9.4.1/docs/JSDOM-Generated-EventTarget.html</a>.
  My code is the following:</p>
  <pre><code>event  &lt;- (toJSVal &quot;click&quot; )
  dispatchEvent_ (button_run :: HTMLButtonElement) (MouseEvent event  )
  </code></pre>
  <p>However I encounter the following runtime error:</p>
  <blockquote>
  <p>Argument 1 ('event') to EventTarget.dispatchEvent must be an instance of Event.</p>
  </blockquote>
  <p>Thanks for the help.</p>