Export satisfy
[lsp-test.git] / src / Language / Haskell / LSP / Test / Parsing.hs
index 1fd394f3db1ee96a6810a25fa4e62e9be9f235e2..09006b67859957aedab3ac045a3926ad09598037 100644 (file)
@@ -5,7 +5,8 @@
 
 module Language.Haskell.LSP.Test.Parsing
   ( -- $receiving
-    message
+    satisfy
+  , message
   , anyRequest
   , anyResponse
   , anyNotification
@@ -60,6 +61,9 @@ import Language.Haskell.LSP.Test.Session
 --               anyResponse
 -- @
 
+-- | Consumes and returns the next message, if it satisfies the specified predicate.
+--
+-- @since 0.5.2.0
 satisfy :: (FromServerMessage -> Bool) -> Session FromServerMessage
 satisfy pred = do
 
@@ -85,7 +89,7 @@ satisfy pred = do
       return x
     else empty
 
--- | Matches a message of type 'a'.
+-- | Matches a message of type @a@.
 message :: forall a. (Typeable a, FromJSON a) => Session a
 message =
   let parser = decode . encodeMsg :: FromServerMessage -> Maybe a