Do it the right-ish way, with performEvent instead of unsafePerformIO
The key insight here is that the type of _frontend_body does not bring enough constraints along to use performEvent, even though the execution context (native, anyway) can satisfy those constraints. Splitting the code out into a separate function made the compiler error much more understandable for me and it just became a matter of adding the necessary typeclass constraints. It remains to be seen whether this approach actually gives you something that will work on Android, though.
Loading
Please register or sign in to comment