File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
lsp-test/src/Language/LSP/Test Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -114,13 +114,15 @@ named s (Session x) = Session (Data.Conduit.Parser.named s x)
114114
115115
116116-- | Matches a request or a notification coming from the server.
117+ -- Doesn't match Custom Messages
117118message :: SServerMethod m -> Session (ServerMessage m )
119+ message (SCustomMethod _) = error " message can't be used with CustomMethod, use customRequest or customNotification instead"
118120message m1 = named (T. pack $ " Request for: " <> show m1) $ satisfyMaybe $ \ case
119121 FromServerMess m2 msg -> do
120122 res <- mEqServer m1 m2
121123 case res of
122124 Right HRefl -> pure msg
123- Left f -> Nothing
125+ Left _f -> Nothing
124126 _ -> Nothing
125127
126128customRequest :: T. Text -> Session (ServerMessage (CustomMethod :: Method FromServer Request ))
You can’t perform that action at this time.
0 commit comments