Open
Description
I have started using Miso with GHCJS and I want to use the web usb API to talk to some local embedded device. I can do this fine by creating foreign functions in GHCJS with something like this:
foreign import javascript interruptible
"navigator.usb.requestDevice({ filters: [ $1 ]}).then($c);"
jsRequestUSBDeviceAccess :: JsObj.Object -> IO JsObj.Object
Now I can simply call the function in Haskell like this:
usbDev <- jsRequestUSBDeviceAccess filters
Since I want to move to jsaddle I want to know how I can essentially rewrite this structure to be compatible with jsaddle. I in particular don't want two function where the second function is a continuation.
Metadata
Assignees
Labels
No labels