Closed ltabis closed 2 years ago
Yes, this is probably a case that doesn't work well. I never anticipated an exported constant can be a closure...
There is no way to refer to the function under external
without attaching the namespace name, which is not supported for function pointers.
I'll need some time to think of a solution to this...
Thank you for your quick response ! I know it is a weird use case, I'll find another way to achieve what I want in the meantime. Have a good day.
It probably won't be easy to support this... maybe I should just fail with an error for the time being...
It probably won't be easy to support this... maybe I should just fail with an error for the time being...
Yes, as long as it's documented I think it's all good. I think exporting anonymous functions could cause unpredictable behavior concerning currying so I guess it's a good idea to just fail !
OK, it'll throw a runtime error then.
This will be in effect for the next release. Thanks for catching this.
Closing for now.
Hello,
I discovered that anonymous function seems to, even though they are de-sugared as functions, not exported by modules. Here is an example:
calling the following script returns:
anon$3135e461af3cc922
"should" have been exported by the module, since it de-sugars into a function.Could it be that
anon$3135e461af3cc922
is under the "external" namespace, and to be able to call it the function pointer should be something like this:I guess anonymous functions not being exported could be normal behavior, but I couldn't find anything specified in the documentation. Did I missed something ?