dyre-0.4: Dynamic reconfiguration in Haskell




relaunchWithState :: Show a => a -> Maybe [String] -> IO ()Source

Relaunch the master binary, but first preserve the program state so that we can use the restoreState functions to get it back again later. Since we're not trying to be fancy here, we'll just use show to write it out.

restoreState :: Read a => a -> IO aSource

Restore state using the maybeRestoreState function, but return the provided default state if we can't get anything better.

relaunchMaster :: Maybe [String] -> IO ()Source

Just relaunch the master binary. We don't have any important state to worry about. (Or, like when relaunchWithState calls it, we're managing state on our own.)

maybeRestoreState :: Read a => IO (Maybe a)Source

Restore state that was previously saved by the relaunchWithState function. If unsuccessful, it will simply return Nothing.