summaryrefslogtreecommitdiff
path: root/Assistant/Monad.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-11-02 12:59:31 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-11-02 14:28:36 -0400
commitc3bd80207051ca96d9d172e29ba600dec25df113 (patch)
tree7e7d0b485e23168d0b6625628fab08b5d5dc3213 /Assistant/Monad.hs
parentf22a85ee6fa271ee799c10497ccd4ced3134f1ad (diff)
xmpp buddy list tracking
Diffstat (limited to 'Assistant/Monad.hs')
-rw-r--r--Assistant/Monad.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Assistant/Monad.hs b/Assistant/Monad.hs
index fb4cb3340..64718a7a1 100644
--- a/Assistant/Monad.hs
+++ b/Assistant/Monad.hs
@@ -5,7 +5,7 @@
- Licensed under the GNU GPL version 3 or higher.
-}
-{-# LANGUAGE PackageImports, GeneralizedNewtypeDeriving, TypeFamilies, MultiParamTypeClasses #-}
+{-# LANGUAGE PackageImports, GeneralizedNewtypeDeriving, MultiParamTypeClasses #-}
module Assistant.Monad (
Assistant,
@@ -34,6 +34,7 @@ import Assistant.Types.Pushes
import Assistant.Types.BranchChange
import Assistant.Types.Commits
import Assistant.Types.Changes
+import Assistant.Types.Buddies
newtype Assistant a = Assistant { mkAssistant :: ReaderT AssistantData IO a }
deriving (
@@ -59,6 +60,7 @@ data AssistantData = AssistantData
, commitChan :: CommitChan
, changeChan :: ChangeChan
, branchChangeHandle :: BranchChangeHandle
+ , buddyList :: BuddyList
}
newAssistantData :: ThreadState -> DaemonStatusHandle -> IO AssistantData
@@ -74,6 +76,7 @@ newAssistantData st dstatus = AssistantData
<*> newCommitChan
<*> newChangeChan
<*> newBranchChangeHandle
+ <*> newBuddyList
runAssistant :: Assistant a -> AssistantData -> IO a
runAssistant a = runReaderT (mkAssistant a)