kallisti-dev/hs-webdriver — pull request #20 by wuzzeb (2014-01-04 22:03:13+00:00)
Title: Make asyncJS distinguish between timeout and null return

When the javascript function passed to asyncJS calls the callback
with no parameters, webdriver interprets this as a JSON Null return
value. The asyncJS function would then parse this to Nothing, so that
it is impossible to know if the asyncJS function timed out or completed
successfully since a timeout is also signaled by Nothing. Therefore,
when asyncJS completes successfully, force a Just. This causes the Null
to become (Just Null) which can be distinguished from timeout.