I have the following code:
In SomeCode.js
exports.runnerImpl = function (arg) {
return function no() {
console.log("This should show " + arg);
}
}
In SomeCode.purs
foreign import runnerImpl:: String -> Effect Unit
runner :: String -> Effect Unit
runner = runnerImpl
In Main.purs
main :: Effect Unit
main = launchAff_ do
liftEffect $ runner "HOHOHO"
Now if I run spago run
it will print This should show HOHOHO
as expected and then it will do nothing (that is it will not terminate until I press ctrl-c
).
Why is this happening? If i run native purescript code with the same type as runnerImpl things work as expected.