Skip to content

Wrong type signature for JavaScript asyncCallback in document

Summary

Location of documentation issue: the GHC user's guide

This line here [1]:

* asyncCallback :: (JSVal -> IO ()) -> IO (Callback (JSVal -> IO ()))

...should either be:

* asyncCallback1 :: (JSVal -> IO ()) -> IO (Callback (JSVal -> IO ()))

or:

* asyncCallback :: IO () -> IO (Callback (IO ()))

...according to [2].

  • [1] - docs/users_guide/javascript.rst#L140
  • [2] - libraries/base/src/GHC/JS/Foreign/Callback.hs#L116

Proposed improvements or changes

Update to the corresponding type signature.

Environment

  • GHC version used (if appropriate): 9.8.1
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information