wasm backend ghci fails with `Illegal foreign declaration` for modules with JSFFI exports
when loading a module with JSFFI exports into wasm backend, e.g. the following module:
```haskell
main :: IO ()
main = pure ()
foreign export javascript "my_main" main :: IO ()
```
it fails with the following error message:
```
T26998.hs:4:1: error: [GHC-03355]
• Illegal foreign declaration: requires one of these back ends:
native code generator, LLVM, compiling via C,
compiling to JavaScript, or no code generated
• When checking declaration:
foreign export javascript "my_main" main :: IO ()
```
this becomes troublesome when loading project code that include JSFFI exports. now, JSFFI imports already work, and they have well-defined semantics when modules are loaded as bytecode via ghci. but for JSFFI exports, they are really only useful in compiled code, where the export is available as a wasm module export; for ghci it's not really useful, and it doesn't make sense to pollute `globalThis` with the exported binding or make it available via `__exports` which is again, deliberately hidden from other js libraries. so JSFFI exports should be no-ops for wasm ghci, it's a more sensible default.
issue