Am Sa, 9.08.2014, 06:04, schrieb Jeremy Shaw:
>
> (And in javascript, you
> just have global variables, AFAIK).
Variables are global by default. But you can initialize a variable with
"var" and then it becomes local to the lexical scope it was defined in.
> I see that there is a IQuery.State -- but that only allows storing
> very primitive values.
The way I've built IQuery.State you have to specifically implement each
data type into the module. I have currently no time or motivation to
enhance the module myself, but that shouldn't stop you to do that if you
so desire.
You would have to add a value to StateTy and expand the functions
interpSTy (trivial), fromState' and toState (slightly more complicated) to
do so.
> A grep of the idris source seems to indicate that
> System.Concurrency.Process is not implemented by the javascript
> backend as I could find no references to idris_sendMessage outside of
> the C RTS.
>
> Is there a plan for what this will look like in the future?
As much as some do like the idea of having proper concurrency support in
JS, afaik no one is currently working on that.
Br,
tauli