Commit 237049a6 authored by Jurriën Stutterheim's avatar Jurriën Stutterheim

Replace all occurrences of Void with ()

parent 150d2b57
Subproject commit 0bb22479a9bdfa9a103edb1d2a99f4d126adfc95
Subproject commit 7dae32037e9da579bf2f4ea9e95305092f23b6fb
......@@ -16,7 +16,6 @@ from iTasks.API.Common.ImportTasks import importTextFile
from System.File import qualified fileExists, readFile
from Data.Map import qualified newMap, put
from Data.Void import :: Void(..)
from System.Process import qualified ::ProcessHandle, runProcess, checkProcess,callProcess
from System.Process import :: ProcessHandle(..)
from StdFunc import o
......
......@@ -5,7 +5,6 @@ from iTasks._Framework.Task import :: TaskException
from iTasks._Framework.Generic import class iTask, generic gEditor, generic gEq, generic gDefault, generic gText, :: TextFormat
from iTasks.UI.Editor import :: Editor, :: EditMask, :: Masked
from Text.JSON import :: JSONNode, generic JSONEncode, generic JSONDecode
from Data.Void import :: Void
from Data.Maybe import :: Maybe
from Data.Either import :: Either
from Data.Error import :: MaybeError, :: MaybeErrorString
......
definition module iTasks.UI.JS.Interface
import StdString, StdGeneric, Data.Void, Data.Maybe
import StdString, StdGeneric, Data.Maybe
import iTasks
from Control.Applicative import class Applicative
......@@ -154,8 +154,6 @@ instance ToArgs Char
instance ToArgs String
instance ToArgs Void
instance ToArgs ()
instance ToArgs JSArg
......
......@@ -3,7 +3,7 @@ implementation module iTasks.UI.JS.Interface
import iTasks
import StdGeneric, StdString, StdMisc, StdBool, StdEnum, StdTuple, StdList
import Data.Void, Data.Maybe, Text
import Data.Maybe, Text
import Control.Applicative
import qualified Control.Monad as M
......@@ -253,9 +253,6 @@ instance ToArgs String where
instance ToArgs () where
toArgs _ = []
instance ToArgs Void where
toArgs _ = []
instance ToArgs (JSVal a) where
toArgs x = [toJSArg x]
......
definition module iTasks._Framework.Client.LinkerSupport
import StdString
import Data.Maybe, Data.Void
import Data.Maybe
import iTasks._Framework.IWorld
import iTasks.UI.Editor
......
......@@ -11,14 +11,13 @@ generic gDefault a :: a
derive gDefault UNIT, PAIR, EITHER, CONS, OBJECT, RECORD, FIELD
derive gDefault Int, Real, Char, Bool, String, [], (), (,), (,,), (,,,), (,,,,), (,,,,,), (,,,,,,), (,,,,,,,), (->), Dynamic
derive gDefault Maybe, Either, MaybeError, Void, Map, JSONNode, HtmlTag, Timestamp
derive gDefault Maybe, Either, MaybeError, Map, JSONNode, HtmlTag, Timestamp
from Text.JSON import :: JSONNode
from Text.HTML import :: HtmlTag
from Data.Maybe import :: Maybe
from Data.Either import :: Either
from Data.Error import :: MaybeError
from Data.Void import :: Void
from Data.Map import :: Map
from System.Time import :: Timestamp
......
implementation module iTasks._Framework.Generic.Defaults
import StdGeneric, StdFunc
import Data.Maybe, Data.Either, Data.Error, Data.Void, Data.Map, Text.HTML, Text.JSON, System.Time
import Data.Maybe, Data.Either, Data.Error, Data.Map, Text.HTML, Text.JSON, System.Time
generic gDefault a :: a
......@@ -35,7 +35,7 @@ gDefault{|HtmlTag|} = Html ""
gDefault{|Map|} fa fb = newMap
//SCARY BUG: When 'Map' is derived programs segfault when used in 'update' task on a shared source
derive gDefault Either, MaybeError, Void, /*Map,*/ JSONNode, Timestamp
derive gDefault Either, MaybeError, /*Map,*/ JSONNode, Timestamp
defaultValue :: a | gDefault{|*|} a
defaultValue = gDefault{|*|}
......@@ -6,7 +6,6 @@ from Text.HTML import :: HtmlTag
from Data.Maybe import :: Maybe
from Data.Either import :: Either
from Data.Error import :: MaybeError
from Data.Void import :: Void
from Data.Map import :: Map
from System.Time import :: Timestamp
from iTasks._Framework.SDS import :: RWShared
......@@ -24,7 +23,7 @@ generic gText a :: !TextFormat (Maybe a) -> [String]
//Default available instances
derive gText UNIT, PAIR, EITHER, CONS of {gcd_name,gcd_type_def}, OBJECT, RECORD, FIELD of {gfd_name}
derive gText Int, Real, Char, Bool, String, [], (), (,), (,,), (,,,), (,,,,), (,,,,,), (,,,,,,), (,,,,,,,), (->), Dynamic
derive gText Maybe, Either, MaybeError, Void, Map, JSONNode, HtmlTag, Timestamp, RWShared
derive gText Maybe, Either, MaybeError, Map, JSONNode, HtmlTag, Timestamp, RWShared
//Wrapper functions for visualization
toSingleLineText :: !a -> String | gText{|*|} a
......
implementation module iTasks._Framework.Generic.Visualization
import StdGeneric, StdList, StdMisc, StdArray
import Data.Maybe, Data.Either, Data.Void, Data.Functor
import Data.Maybe, Data.Either, Data.Functor
from Data.Map import :: Map (..)
import qualified Data.Map as DM
import qualified Data.List as DL
......@@ -58,7 +58,6 @@ gText{|[]|} fx mode Nothing = [""]
gText{|Maybe|} fx mode (Just val) = fromMaybe ["-"] (fmap (\v -> fx mode (Just v)) val)
gText{|Maybe|} fx mode Nothing = fx AsHeader Nothing
gText{|Void|} _ _ = []
gText{|Dynamic|} _ _ = []
gText{|(->)|} _ _ _ _ = []
gText{|JSONNode|} _ val = [maybe "" toString val]
......
definition module iTasks._Framework.IWorld
from System.FilePath import :: FilePath
from Data.Void import :: Void
from Data.Map import :: Map
from Data.Maybe import :: Maybe
from Data.Error import :: MaybeError(..), :: MaybeErrorString(..)
......
......@@ -11,7 +11,7 @@ from Data.Queue import :: Queue
import iTasks._Framework.Generic
import Data.Maybe, Data.Void, Data.Error, Text.JSON
import Data.Maybe, Data.Error, Text.JSON
sdsService :: (!(String -> Bool)
,!Bool
......@@ -21,6 +21,6 @@ sdsService :: (!(String -> Bool)
)
readRemoteSDS :: !JSONNode !String !*IWorld -> *(!MaybeErrorString JSONNode, !*IWorld)
writeRemoteSDS :: !JSONNode !JSONNode !String !*IWorld -> *(!MaybeErrorString Void, !*IWorld)
writeRemoteSDS :: !JSONNode !JSONNode !String !*IWorld -> *(!MaybeErrorString (), !*IWorld)
openRemoteSDS :: !String !((Maybe (RWShared p r w)) -> Task a) -> Task a | iTask a & JSONEncode{|*|} p & JSONDecode{|*|} r & JSONEncode{|*|} w & TC p & TC r & TC w
......@@ -18,7 +18,7 @@ from StdFunc import o
import StdString, StdList
from Data.Map import qualified get, fromList
from Data.Map import fromList
import Data.Maybe, Data.Void, Data.Error
import Data.Maybe, Data.Error
import Text.URI
import StdMisc, graph_to_sapl_string
import Data.Queue
......@@ -107,7 +107,7 @@ where
uriPort = u.uriPort,
uriPath = "/sds" +++ u.uriPath}
writeRemoteSDS :: !JSONNode !JSONNode !String !*IWorld -> *(!MaybeErrorString Void, !*IWorld)
writeRemoteSDS :: !JSONNode !JSONNode !String !*IWorld -> *(!MaybeErrorString (), !*IWorld)
writeRemoteSDS p val url iworld
= case convertURL url (Just p) of
(Ok uri) = load uri val iworld
......@@ -116,7 +116,7 @@ where
load uri val iworld
# (response, iworld) = httpRequest HTTP_PUT uri (Just (toString val)) iworld
= if (isOkResponse response)
(Ok Void, iworld)
(Ok (), iworld)
(Error ("Request failed: "+++response.HTTPResponse.rsp_reason), iworld)
remoteJSONShared :: !String -> JSONShared
......@@ -134,7 +134,7 @@ where
(Error msg, iworld) = (Error (exception msg), iworld)
rwrite jsonp jsonw iworld
= case writeRemoteSDS jsonp jsonw url iworld of
(Ok Void, iworld) = (Ok (const False), iworld)
(Ok (), iworld) = (Ok (const False), iworld)
(Error msg, iworld) = (Error (exception msg), iworld)
openRemoteSDS :: !String !((Maybe (RWShared p r w)) -> Task a) -> Task a | iTask a & JSONEncode{|*|} p & JSONDecode{|*|} r & JSONEncode{|*|} w & TC p & TC r & TC w
......
......@@ -11,7 +11,6 @@ definition module iTasks._Framework.Store
*/
from Text.JSON import generic JSONEncode, generic JSONDecode, :: JSONNode
from Data.Maybe import :: Maybe
from Data.Void import :: Void
from Data.Error import :: MaybeError, :: MaybeErrorString
from System.Time import :: Timestamp
from System.FilePath import :: FilePath
......
implementation module iTasks._Framework.Store
import StdEnv
import Data.Void
from Data.Map import :: Map
import qualified Data.Map as DM
import Data.Maybe, Data.Functor, Data.Error
......@@ -90,7 +89,7 @@ where
= (Ok ((==) key),iworld)
//Utility SDS which provides the current build such that higher level stores can check against it
buildID :: RWShared p BuildID Void
buildID :: RWShared p BuildID ()
buildID = createReadWriteSDS "system" "buildID" read write
where
read _ iworld=:{server={buildID}} = (Ok buildID,iworld)
......@@ -114,7 +113,7 @@ where
where
storeDesc = namespace +++ "/" +++ key
write key w = Ok (Just (toString (toJSON w),Void))
write key w = Ok (Just (toString (toJSON w), ()))
notify key w = const True
cachedJSONFileStore :: !StoreNamespace !Bool !Bool !Bool !(Maybe a) -> RWShared StoreName a a | JSONEncode{|*|}, JSONDecode{|*|}, TC a
......
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