Add the misssing bangs.
This commit is contained in:
parent
c98518ba97
commit
ce4e99b7d6
@ -37,7 +37,7 @@ data ProtocolServerOp =
|
|||||||
BindResponse !LdapResult !(Maybe ByteString)
|
BindResponse !LdapResult !(Maybe ByteString)
|
||||||
| SearchResultEntry !LdapDn !PartialAttributeList
|
| SearchResultEntry !LdapDn !PartialAttributeList
|
||||||
| SearchResultReference !(NonEmpty Uri)
|
| SearchResultReference !(NonEmpty Uri)
|
||||||
| SearchResultDone !(LdapResult)
|
| SearchResultDone !LdapResult
|
||||||
| ModifyResponse !LdapResult
|
| ModifyResponse !LdapResult
|
||||||
| AddResponse !LdapResult
|
| AddResponse !LdapResult
|
||||||
| DeleteResponse !LdapResult
|
| DeleteResponse !LdapResult
|
||||||
@ -49,7 +49,7 @@ data ProtocolServerOp =
|
|||||||
|
|
||||||
-- | Not really a choice until SASL is supported.
|
-- | Not really a choice until SASL is supported.
|
||||||
data AuthenticationChoice =
|
data AuthenticationChoice =
|
||||||
Simple ByteString
|
Simple !ByteString
|
||||||
| Sasl !SaslMechanism !(Maybe Text)
|
| Sasl !SaslMechanism !(Maybe Text)
|
||||||
deriving (Show, Eq)
|
deriving (Show, Eq)
|
||||||
|
|
||||||
@ -77,16 +77,16 @@ data DerefAliases =
|
|||||||
|
|
||||||
-- | Conditions that must be fulfilled in order for the Search to match a given entry.
|
-- | Conditions that must be fulfilled in order for the Search to match a given entry.
|
||||||
data Filter =
|
data Filter =
|
||||||
And !(NonEmpty Filter) -- ^ All filters evaluate to @TRUE@
|
And !(NonEmpty Filter) -- ^ All filters evaluate to @TRUE@
|
||||||
| Or !(NonEmpty Filter) -- ^ Any filter evaluates to @TRUE@
|
| Or !(NonEmpty Filter) -- ^ Any filter evaluates to @TRUE@
|
||||||
| Not Filter -- ^ Filter evaluates to @FALSE@
|
| Not !Filter -- ^ Filter evaluates to @FALSE@
|
||||||
| EqualityMatch AttributeValueAssertion -- ^ @EQUALITY@ rule returns @TRUE@
|
| EqualityMatch !AttributeValueAssertion -- ^ @EQUALITY@ rule returns @TRUE@
|
||||||
| Substrings SubstringFilter -- ^ @SUBSTR@ rule returns @TRUE@
|
| Substrings !SubstringFilter -- ^ @SUBSTR@ rule returns @TRUE@
|
||||||
| GreaterOrEqual AttributeValueAssertion -- ^ @ORDERING@ rule returns @FALSE@
|
| GreaterOrEqual !AttributeValueAssertion -- ^ @ORDERING@ rule returns @FALSE@
|
||||||
| LessOrEqual AttributeValueAssertion -- ^ @ORDERING@ or @EQUALITY@ rule returns @TRUE@
|
| LessOrEqual !AttributeValueAssertion -- ^ @ORDERING@ or @EQUALITY@ rule returns @TRUE@
|
||||||
| Present AttributeDescription -- ^ Attribute is present in the entry
|
| Present !AttributeDescription -- ^ Attribute is present in the entry
|
||||||
| ApproxMatch AttributeValueAssertion -- ^ Same as 'EqualityMatch' for most servers
|
| ApproxMatch !AttributeValueAssertion -- ^ Same as 'EqualityMatch' for most servers
|
||||||
| ExtensibleMatch MatchingRuleAssertion
|
| ExtensibleMatch !MatchingRuleAssertion
|
||||||
deriving (Show, Eq)
|
deriving (Show, Eq)
|
||||||
|
|
||||||
data SubstringFilter = SubstringFilter !AttributeDescription !(NonEmpty Substring)
|
data SubstringFilter = SubstringFilter !AttributeDescription !(NonEmpty Substring)
|
||||||
|
|||||||
@ -119,10 +119,10 @@ newLdap = Ldap
|
|||||||
|
|
||||||
-- | Various failures that can happen when working with LDAP.
|
-- | Various failures that can happen when working with LDAP.
|
||||||
data LdapError =
|
data LdapError =
|
||||||
IOError IOError -- ^ Network failure.
|
IOError !IOError -- ^ Network failure.
|
||||||
| ParseError Asn1.ASN1Error -- ^ Invalid ASN.1 data received from the server.
|
| ParseError !Asn1.ASN1Error -- ^ Invalid ASN.1 data received from the server.
|
||||||
| ResponseError ResponseError -- ^ An LDAP operation failed.
|
| ResponseError !ResponseError -- ^ An LDAP operation failed.
|
||||||
| DisconnectError Disconnect -- ^ Notice of Disconnection has been received.
|
| DisconnectError !Disconnect -- ^ Notice of Disconnection has been received.
|
||||||
deriving (Show, Eq)
|
deriving (Show, Eq)
|
||||||
|
|
||||||
newtype WrappedIOError = WrappedIOError IOError
|
newtype WrappedIOError = WrappedIOError IOError
|
||||||
@ -130,7 +130,7 @@ newtype WrappedIOError = WrappedIOError IOError
|
|||||||
|
|
||||||
instance Exception WrappedIOError
|
instance Exception WrappedIOError
|
||||||
|
|
||||||
data Disconnect = Disconnect Type.ResultCode Dn Text
|
data Disconnect = Disconnect !Type.ResultCode !Dn !Text
|
||||||
deriving (Show, Eq, Typeable)
|
deriving (Show, Eq, Typeable)
|
||||||
|
|
||||||
instance Exception Disconnect
|
instance Exception Disconnect
|
||||||
|
|||||||
@ -51,17 +51,17 @@ data Host =
|
|||||||
deriving (Show)
|
deriving (Show)
|
||||||
|
|
||||||
-- | A token. All functions that interact with the Directory require one.
|
-- | A token. All functions that interact with the Directory require one.
|
||||||
data Ldap = Ldap
|
newtype Ldap = Ldap
|
||||||
{ client :: TQueue ClientMessage
|
{ client :: TQueue ClientMessage
|
||||||
} deriving (Eq)
|
} deriving (Eq)
|
||||||
|
|
||||||
data ClientMessage = New Request (TMVar (NonEmpty Type.ProtocolServerOp))
|
data ClientMessage = New !Request !(TMVar (NonEmpty Type.ProtocolServerOp))
|
||||||
type Request = Type.ProtocolClientOp
|
type Request = Type.ProtocolClientOp
|
||||||
type InMessage = Type.ProtocolServerOp
|
type InMessage = Type.ProtocolServerOp
|
||||||
type Response = NonEmpty InMessage
|
type Response = NonEmpty InMessage
|
||||||
|
|
||||||
-- | Asynchronous LDAP operation. Use 'wait' or 'waitSTM' to wait for its completion.
|
-- | Asynchronous LDAP operation. Use 'wait' or 'waitSTM' to wait for its completion.
|
||||||
data Async a = Async (STM (Either ResponseError a))
|
newtype Async a = Async (STM (Either ResponseError a))
|
||||||
|
|
||||||
instance Functor Async where
|
instance Functor Async where
|
||||||
fmap f (Async stm) = Async (fmap (fmap f) stm)
|
fmap f (Async stm) = Async (fmap (fmap f) stm)
|
||||||
@ -72,8 +72,8 @@ newtype Dn = Dn Text
|
|||||||
|
|
||||||
-- | Response indicates a failed operation.
|
-- | Response indicates a failed operation.
|
||||||
data ResponseError =
|
data ResponseError =
|
||||||
ResponseInvalid Request Response -- ^ LDAP server did not follow the protocol, so @ldap-client@ couldn't make sense of the response.
|
ResponseInvalid !Request !Response -- ^ LDAP server did not follow the protocol, so @ldap-client@ couldn't make sense of the response.
|
||||||
| ResponseErrorCode Request Type.ResultCode Dn Text -- ^ The response contains a result code indicating failure and an error message.
|
| ResponseErrorCode !Request !Type.ResultCode !Dn !Text -- ^ The response contains a result code indicating failure and an error message.
|
||||||
deriving (Show, Eq, Typeable)
|
deriving (Show, Eq, Typeable)
|
||||||
|
|
||||||
instance Exception ResponseError
|
instance Exception ResponseError
|
||||||
|
|||||||
@ -40,9 +40,9 @@ import Ldap.Client.Internal
|
|||||||
|
|
||||||
-- | Type of modification being performed.
|
-- | Type of modification being performed.
|
||||||
data Operation =
|
data Operation =
|
||||||
Delete Attr [AttrValue] -- ^ Delete values from the attribute. Deletes the attribute if the list is empty or all current values are listed.
|
Delete !Attr ![AttrValue] -- ^ Delete values from the attribute. Deletes the attribute if the list is empty or all current values are listed.
|
||||||
| Add Attr [AttrValue] -- ^ Add values to the attribute, creating it if necessary.
|
| Add !Attr ![AttrValue] -- ^ Add values to the attribute, creating it if necessary.
|
||||||
| Replace Attr [AttrValue] -- ^ Replace all existing values of the attribute with the new list. Deletes the attribute if the list is empty.
|
| Replace !Attr ![AttrValue] -- ^ Replace all existing values of the attribute with the new list. Deletes the attribute if the list is empty.
|
||||||
deriving (Show, Eq)
|
deriving (Show, Eq)
|
||||||
|
|
||||||
-- | Perform the Modify operation synchronously. Raises 'ResponseError' on failures.
|
-- | Perform the Modify operation synchronously. Raises 'ResponseError' on failures.
|
||||||
|
|||||||
@ -215,7 +215,7 @@ data Filter =
|
|||||||
| !Attr :~= !AttrValue -- ^ Attribute's value approximately matches the assertion
|
| !Attr :~= !AttrValue -- ^ Attribute's value approximately matches the assertion
|
||||||
| !Attr :=* !(Maybe AttrValue, [AttrValue], Maybe AttrValue)
|
| !Attr :=* !(Maybe AttrValue, [AttrValue], Maybe AttrValue)
|
||||||
-- ^ Glob match
|
-- ^ Glob match
|
||||||
| (Maybe Attr, Maybe Attr, Bool) ::= AttrValue
|
| !(Maybe Attr, Maybe Attr, Bool) ::= !AttrValue
|
||||||
-- ^ Extensible match
|
-- ^ Extensible match
|
||||||
|
|
||||||
-- | Entry found during the Search.
|
-- | Entry found during the Search.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user