PureScript Async FFI
I recently posted about using Aff for asynchronous effects in PureScript. In this follow-up post, I’m going to discuss using JavaScript FFI in conjuction with Aff. Aff and FFI PureScript gives us very nice FFI utilities to call JavaScript code. Aff provides a function called fromEffectFnAff that lets us turn asynchronous JavaScript behavior into an Aff in our PureScript code. Let’s create an example that reads a file from the file system using FFI....