Assistant monad, stage 3
All toplevel named threads are converted to the Assistant monad. Some utility functions still need to be converted.
This commit is contained in:
parent
1df7417403
commit
67ce7929a5
7 changed files with 174 additions and 182 deletions
|
@ -78,6 +78,9 @@ getAssistantY f = f <$> (assistantData <$> getYesod)
|
|||
getDaemonStatusY :: forall sub. GHandler sub WebApp DaemonStatus
|
||||
getDaemonStatusY = liftIO . getDaemonStatus =<< getAssistantY daemonStatusHandle
|
||||
|
||||
runAssistantY :: forall sub a. (Assistant a) -> GHandler sub WebApp a
|
||||
runAssistantY a = liftIO . runAssistant a =<< assistantData <$> getYesod
|
||||
|
||||
getWebAppState :: forall sub. GHandler sub WebApp WebAppState
|
||||
getWebAppState = liftIO . atomically . readTMVar =<< webAppState <$> getYesod
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue