- Nothing (Just socket_path) $ getServer socket_path
- return (socket_path, s)
+ Nothing (Just socket_path) $ getServer True socket_path
+ cref <- newIORef (Bad "Configuration not yet loaded")
+ return (socket_path, s, cref)
+
+-- | Main function.
+main :: MainFn () PrepResult
+main _ _ (socket_path, server, cref) = do
+ initConfigReader id cref
+ let creader = readIORef cref