From 1552bd919154ab2fb67f90223df9f968f5340b68 Mon Sep 17 00:00:00 2001
From: Philipp Balzarek
Date: Thu, 24 Sep 2015 14:14:03 +0200
Subject: [PATCH] document Subscription type
---
source/Network/Xmpp/IM/Roster/Types.hs | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/source/Network/Xmpp/IM/Roster/Types.hs b/source/Network/Xmpp/IM/Roster/Types.hs
index 6c63e82..7c03c98 100644
--- a/source/Network/Xmpp/IM/Roster/Types.hs
+++ b/source/Network/Xmpp/IM/Roster/Types.hs
@@ -7,7 +7,20 @@ import Network.Xmpp.Types
-- Note that `Remove' is not exported from IM.hs, as it will never be visible to
-- the user anyway.
-data Subscription = None | To | From | Both | Remove deriving (Eq, Read, Show)
+data Subscription = None -- ^ the user does not have a subscription to the
+ -- contact's presence information, and the contact does
+ -- not have a subscription to the user's presence
+ -- information
+ | To -- ^ the user has a subscription to the contact's
+ -- presence information, but the contact does not have a
+ -- subscription to the user's presence information
+ | From -- ^ the contact has a subscription to the user's
+ -- presence information, but the user does not have a
+ -- subscription to the contact's presence information
+ | Both -- ^ both the user and the contact have subscriptions
+ -- to each other's presence information
+ | Remove
+ deriving (Eq, Read, Show)
data Roster = Roster { ver :: Maybe Text
, items :: Map.Map Jid Item