implementation module iTasks.Framework.TaskState import Text.JSON import iTasks.Framework.UIDefinition from iTasks import JSONEncode, JSONDecode from iTasks.Framework.Task import :: Event, :: TaskTime, :: TaskResult(..), :: TaskInfo(..), :: TaskRep(..), :: TaskServiceRep, :: TaskPart, :: EventNo import iTasks.API.Core.Types derive JSONEncode TIMeta, TIType, TIValue, TIReduct, TaskTree, TaskListEntry, TaskListEntryState, TaskResult, TaskRep, TaskInfo derive JSONDecode TIMeta, TIType, TIValue, TIReduct, TaskTree, TaskListEntry, TaskListEntryState, TaskResult, TaskRep, TaskInfo //IS ALSO DERIVED IN TASK STORE: SEEMS REDUNDANT derive JSONEncode UIDef, UIContent, UIAction, UIViewport, UIWindow, UIControl, UIFSizeOpts, UISizeOpts, UIHSizeOpts, UIViewOpts, UIEditOpts, UIActionOpts, UIChoiceOpts, UIItemsOpts derive JSONEncode UIControlStack, UISubUI, UISubUIStack derive JSONEncode UIProgressOpts, UISliderOpts, UIGridOpts, UITreeOpts, UIIconOpts, UILabelOpts, UITreeNode derive JSONEncode UIMenuButtonOpts, UIButtonOpts, UIPanelOpts, UIFieldSetOpts, UIWindowOpts, UIViewportOpts, UITabSetOpts, UITab, UITabOpts derive JSONEncode UISize, UIBound, UIDirection, UIHAlign, UIVAlign, UISideSizes, UIMenuItem derive JSONEncode UITaskletOpts, UIEditletOpts, UIEmbeddingOpts //derive JSONDecode TaskCompositionType derive JSONDecode UIDef, UIContent, UIAction, UIViewport, UIWindow, UIControl, UIFSizeOpts, UISizeOpts, UIHSizeOpts, UIViewOpts, UIEditOpts, UIActionOpts, UIChoiceOpts, UIItemsOpts derive JSONDecode UIControlStack, UISubUI, UISubUIStack derive JSONDecode UIProgressOpts, UISliderOpts, UIGridOpts, UITreeOpts, UIIconOpts, UILabelOpts, UITreeNode derive JSONDecode UIMenuButtonOpts, UIButtonOpts, UIPanelOpts, UIFieldSetOpts, UIWindowOpts, UIViewportOpts, UITabSetOpts, UITab, UITabOpts derive JSONDecode UISize, UIBound, UIDirection, UIHAlign, UIVAlign, UISideSizes, UIMenuItem derive JSONDecode UITaskletOpts, UIEditletOpts, UIEmbeddingOpts JSONEncode{|DeferredJSON|} _ (DeferredJSON a) = JSONEncode{|*|} False a JSONEncode{|DeferredJSON|} _ (DeferredJSONNode json) = [json] JSONDecode{|DeferredJSON|} _ [] = (Just (DeferredJSONNode JSONNull), []) JSONDecode{|DeferredJSON|} _ [x:xs] = ((Just (DeferredJSONNode x)), xs) JSONDecode{|DeferredJSON|} _ l = (Nothing, l)