Safe Haskell | None |
---|
- relaunchMaster :: Maybe [String] -> IO ()
- relaunchWithTextState :: Show a => a -> Maybe [String] -> IO ()
- relaunchWithBinaryState :: Binary a => a -> Maybe [String] -> IO ()
- saveTextState :: Show a => a -> IO ()
- saveBinaryState :: Binary a => a -> IO ()
- restoreTextState :: Read a => a -> IO a
- restoreBinaryState :: Binary a => a -> IO a
Documentation
relaunchMaster :: Maybe [String] -> IO ()Source
Just relaunch the master binary. We don't have any important
state to worry about. (Or, like when 'relaunchWith<X>State' calls
it, we're managing state on our own). It takes an argument which
can optionally specify a new set of arguments. If it is given a
value of Nothing
, the current value of getArgs
will be used.
relaunchWithTextState :: Show a => a -> Maybe [String] -> IO ()Source
Relaunch the master binary, but first preserve the program
state so that we can use the restoreTextState
functions to
get it back again later.
relaunchWithBinaryState :: Binary a => a -> Maybe [String] -> IO ()Source
Serialize the state for later restoration with restoreBinaryState
,
and then relaunch the master binary.
saveTextState :: Show a => a -> IO ()Source
Serialize a state as text, for later loading with the
restoreTextState
function.
saveBinaryState :: Binary a => a -> IO ()Source
Serialize a state as binary data, for later loading with
the restoreBinaryState
function.
restoreTextState :: Read a => a -> IO aSource
Restore state which has been serialized through the
saveTextState
function. Takes a default which is
returned if the state doesn't exist.
restoreBinaryState :: Binary a => a -> IO aSource
Restore state which has been serialized through the
saveBinaryState
function. Takes a default which is
returned if the state doesn't exist.