Verified Commit 1060caaa authored by Camil Staps's avatar Camil Staps 🚀

Add JSON derives that are frequently needed

parent e406f28c
......@@ -2,6 +2,7 @@ definition module Electron.App
from StdMaybe import :: Maybe
from ABC.Interpreter.JavaScript import :: JSVal, :: JSFun, :: JSWorld
from Text.GenJSON import :: JSONNode, generic JSONEncode, generic JSONDecode
from iTasks.WF.Definition import :: Task
:: ElectronProcess
......@@ -31,6 +32,9 @@ from iTasks.WF.Definition import :: Task
, messageHandler :: !ServerMessageHandler ctos
}
derive JSONEncode TransportMethod
derive JSONDecode TransportMethod
serveElectron :: !(ElectronProcess UniversalConnectionDetails -> Task Connection) !*World -> *World
runInElectron :: !ElectronProcess !(JSVal *JSWorld -> *JSWorld) -> Task ()
......@@ -26,6 +26,9 @@ import iTasks.Internal.Task
PORT :== 1234
derive JSONEncode TransportMethod
derive JSONDecode TransportMethod
derive JSONEncode Symbol, PrelinkedInterpretationEnvironment
JSONEncode{|{#Symbol}|} b xs = JSONEncode{|*|} b [x \\ x <-: xs]
JSONEncode{|{#Int}|} b xs = JSONEncode{|*|} b [x \\ x <-: xs]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment