Open WolframKahl opened 8 years ago
For the time being, I got it to work using unsafePerformIO $ ... newIORef ...
, but this is not very satisfying...
For 0.6, it's still unclear how this will be implemented, since it will support multiple servers among other things. Currently I'm leaning towards putting this into the same class instance as the routing information, bit this isn't set in stone so suggestions are very welcome.
Haste.App.Simple
will probably implement something very similar to liftServerIO
for the Server
special case, since Simple
already provides a Node
instance for Server
.
I find examples for using server-side state in the Haskell ’14 paper and in
haste-compiler/examples/chatbox/chatbox.hs
, but these rely onliftServerIO
, which is not part of the new Haste anymore.How can server-sider state be implemented with the new
remote $ static (import_ f)
pattern?