@@ -20,7 +20,7 @@ tests = testGroup "completions" [
2020 _ <- applyEdit doc te
2121
2222 compls <- getCompletions doc (Position 5 9 )
23- item <- getCopletionByLabel " putStrLn" compls
23+ item <- getCompletionByLabel " putStrLn" compls
2424 liftIO $ do
2525 item ^. label @?= " putStrLn"
2626 item ^. kind @?= Just CiFunction
@@ -36,7 +36,7 @@ tests = testGroup "completions" [
3636 _ <- applyEdit doc te
3737
3838 compls <- getCompletions doc (Position 5 9 )
39- item <- getCopletionByLabel " putStrLn" compls
39+ item <- getCompletionByLabel " putStrLn" compls
4040 resolvedRes <- request SCompletionItemResolve item
4141 let eResolved = resolvedRes ^. result
4242 case eResolved of
@@ -57,7 +57,7 @@ tests = testGroup "completions" [
5757 _ <- applyEdit doc te
5858
5959 compls <- getCompletions doc (Position 1 23 )
60- item <- getCopletionByLabel " Maybe" compls
60+ item <- getCompletionByLabel " Maybe" compls
6161 liftIO $ do
6262 item ^. label @?= " Maybe"
6363 item ^. detail @?= Just " Data.Maybe"
@@ -72,7 +72,7 @@ tests = testGroup "completions" [
7272 _ <- applyEdit doc te
7373
7474 compls <- getCompletions doc (Position 2 24 )
75- item <- getCopletionByLabel " List" compls
75+ item <- getCompletionByLabel " List" compls
7676 liftIO $ do
7777 item ^. label @?= " List"
7878 item ^. detail @?= Just " Data.List"
@@ -92,7 +92,7 @@ tests = testGroup "completions" [
9292 _ <- applyEdit doc te
9393
9494 compls <- getCompletions doc (Position 5 4 )
95- item <- getCopletionByLabel " accessor" compls
95+ item <- getCompletionByLabel " accessor" compls
9696 liftIO $ do
9797 item ^. label @?= " accessor"
9898 item ^. kind @?= Just CiFunction
@@ -102,7 +102,7 @@ tests = testGroup "completions" [
102102 let te = TextEdit (Range (Position 5 7 ) (Position 5 9 )) " id"
103103 _ <- applyEdit doc te
104104 compls <- getCompletions doc (Position 5 9 )
105- item <- getCopletionByLabel " id" compls
105+ item <- getCompletionByLabel " id" compls
106106 liftIO $ do
107107 item ^. detail @?= Just " :: a -> a"
108108
@@ -112,7 +112,7 @@ tests = testGroup "completions" [
112112 let te = TextEdit (Range (Position 5 7 ) (Position 5 24 )) " flip"
113113 _ <- applyEdit doc te
114114 compls <- getCompletions doc (Position 5 11 )
115- item <- getCopletionByLabel " flip" compls
115+ item <- getCompletionByLabel " flip" compls
116116 liftIO $
117117 item ^. detail @?= Just " :: (a -> b -> c) -> b -> a -> c"
118118
@@ -129,7 +129,7 @@ tests = testGroup "completions" [
129129 _ <- applyEdit doc te
130130
131131 compls <- getCompletions doc (Position 0 31 )
132- item <- getCopletionByLabel " Alternative" compls
132+ item <- getCompletionByLabel " Alternative" compls
133133 liftIO $ do
134134 item ^. label @?= " Alternative"
135135 item ^. kind @?= Just CiFunction
@@ -142,7 +142,7 @@ tests = testGroup "completions" [
142142 _ <- applyEdit doc te
143143
144144 compls <- getCompletions doc (Position 0 41 )
145- item <- getCopletionByLabel " liftA" compls
145+ item <- getCompletionByLabel " liftA" compls
146146 liftIO $ do
147147 item ^. label @?= " liftA"
148148 item ^. kind @?= Just CiFunction
@@ -160,7 +160,7 @@ snippetTests = testGroup "snippets" [
160160 _ <- applyEdit doc te
161161
162162 compls <- getCompletions doc (Position 5 14 )
163- item <- getCopletionByLabel " Nothing" compls
163+ item <- getCompletionByLabel " Nothing" compls
164164 liftIO $ do
165165 item ^. insertTextFormat @?= Just Snippet
166166 item ^. insertText @?= Just " Nothing "
@@ -172,7 +172,7 @@ snippetTests = testGroup "snippets" [
172172 _ <- applyEdit doc te
173173
174174 compls <- getCompletions doc (Position 5 11 )
175- item <- getCopletionByLabel " foldl" compls
175+ item <- getCompletionByLabel " foldl" compls
176176 liftIO $ do
177177 item ^. label @?= " foldl"
178178 item ^. kind @?= Just CiFunction
@@ -186,7 +186,7 @@ snippetTests = testGroup "snippets" [
186186 _ <- applyEdit doc te
187187
188188 compls <- getCompletions doc (Position 5 11 )
189- item <- getCopletionByLabel " mapM" compls
189+ item <- getCompletionByLabel " mapM" compls
190190 liftIO $ do
191191 item ^. label @?= " mapM"
192192 item ^. kind @?= Just CiFunction
@@ -200,7 +200,7 @@ snippetTests = testGroup "snippets" [
200200 _ <- applyEdit doc te
201201
202202 compls <- getCompletions doc (Position 5 18 )
203- item <- getCopletionByLabel " filter" compls
203+ item <- getCompletionByLabel " filter" compls
204204 liftIO $ do
205205 item ^. label @?= " filter"
206206 item ^. kind @?= Just CiFunction
@@ -214,7 +214,7 @@ snippetTests = testGroup "snippets" [
214214 _ <- applyEdit doc te
215215
216216 compls <- getCompletions doc (Position 5 18 )
217- item <- getCopletionByLabel " filter" compls
217+ item <- getCompletionByLabel " filter" compls
218218 liftIO $ do
219219 item ^. label @?= " filter"
220220 item ^. kind @?= Just CiFunction
@@ -228,7 +228,7 @@ snippetTests = testGroup "snippets" [
228228 _ <- applyEdit doc te
229229
230230 compls <- getCompletions doc (Position 5 29 )
231- item <- getCopletionByLabel " intersperse" compls
231+ item <- getCompletionByLabel " intersperse" compls
232232 liftIO $ do
233233 item ^. label @?= " intersperse"
234234 item ^. kind @?= Just CiFunction
@@ -242,7 +242,7 @@ snippetTests = testGroup "snippets" [
242242 _ <- applyEdit doc te
243243
244244 compls <- getCompletions doc (Position 5 29 )
245- item <- getCopletionByLabel " intersperse" compls
245+ item <- getCompletionByLabel " intersperse" compls
246246 liftIO $ do
247247 item ^. label @?= " intersperse"
248248 item ^. kind @?= Just CiFunction
@@ -282,7 +282,7 @@ snippetTests = testGroup "snippets" [
282282 _ <- applyEdit doc te
283283
284284 compls <- getCompletions doc (Position 5 11 )
285- item <- getCopletionByLabel " foldl" compls
285+ item <- getCompletionByLabel " foldl" compls
286286 liftIO $ do
287287 item ^. label @?= " foldl"
288288 item ^. kind @?= Just CiFunction
@@ -339,8 +339,8 @@ compls `shouldNotContainCompl` lbl =
339339 all ((/= lbl) . (^. label)) compls
340340 @? " Should not contain completion: " ++ show lbl
341341
342- getCopletionByLabel :: T. Text -> [CompletionItem ] -> Session CompletionItem
343- getCopletionByLabel lbl compls =
342+ getCompletionByLabel :: T. Text -> [CompletionItem ] -> Session CompletionItem
343+ getCompletionByLabel lbl compls =
344344 case find (\ c -> c ^. label == lbl) compls of
345345 Just c -> pure c
346346 Nothing ->
0 commit comments