Reexport modules via cabal
[opengl.git] / src / Language / Haskell / LSP / Test / Parsing.hs
index 1b76e867b580ec8d15e3df74ea69234306adc955..36349dae864f4fbd63aa82c6016d87da1bd52084 100644 (file)
@@ -53,9 +53,8 @@ satisfy pred = do
 message :: forall a. (Typeable a, FromJSON a) => Session a
 message =
   let parser = decode . encodeMsg :: FromServerMessage -> Maybe a
-  in named (T.pack $ show $ head $ snd $ splitTyConApp $ last $ typeRepArgs $ typeOf parser) $ do
-    x <- satisfy (isJust . parser)
-    return $ castMsg x
+  in named (T.pack $ show $ head $ snd $ splitTyConApp $ last $ typeRepArgs $ typeOf parser) $
+    castMsg <$> satisfy (isJust . parser)
 
 -- | Matches if the message is a notification.
 anyNotification :: Session FromServerMessage