I'm trying to create a foreign constant in PureScript but it doesn't seem to call the function.
I have in PureScript:
module Test where
foreign import test :: String
foreign import test2 :: String -> String
and in JavaScript:
"use strict";
// module Test
exports.test = function() {
return "A";
};
exports.test2 = function(x) {
return x;
};
But it doesn't call the foreign function:
> import Prelude
> :t test
Prim.String
> :t test2
Prim.String -> Prim.String
> test
undefined
> test2 "test"
"test"
> test ++ "A"
"function () {\n return \"A\";\n}A"
Is it possible to create a foreign constant? Or are all functions expected to have at least one parameter? I'm using:
$ pulp psci --version
0.7.0.0