File tree 3 files changed +25
-0
lines changed
plugins/hls-pragmas-plugin/test
3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,12 @@ codeActionTests =
32
32
liftIO $ " Add \" FlexibleInstances\" " `elem` map (^. L. title) cas @? " Contains FlexibleInstances code action"
33
33
executeCodeAction $ head cas
34
34
35
+ , goldenWithPragmas " adds LANGUAGE pragma correctly ignoring later INLINE pragma" " AddLanguagePragma" $ \ doc -> do
36
+ _ <- waitForDiagnosticsFrom doc
37
+ cas <- map fromAction <$> getAllCodeActions doc
38
+ liftIO $ " Add \" TupleSections\" " `elem` map (^. L. title) cas @? " Contains TupleSections code action"
39
+ executeCodeAction $ head cas
40
+
35
41
, goldenWithPragmas " adds TypeApplications pragma" " TypeApplications" $ \ doc -> do
36
42
_ <- waitForDiagnosticsFrom doc
37
43
cas <- map fromAction <$> getAllCodeActions doc
Original file line number Diff line number Diff line change
1
+ {-# LANGUAGE OverloadedStrings #-}
2
+ {-# LANGUAGE TupleSections #-}
3
+
4
+ module NeedsLanguagePragms where
5
+
6
+ tupleSection = (1,) <$> Just 2
7
+
8
+ {-# INLINE addOne #-}
9
+ addOne :: Int -> Int
10
+ addOne x = x + 1
Original file line number Diff line number Diff line change
1
+ {-# LANGUAGE OverloadedStrings #-}
2
+
3
+ module NeedsLanguagePragms where
4
+
5
+ tupleSection = (1 ,) <$> Just 2
6
+
7
+ {-# INLINE addOne #-}
8
+ addOne :: Int -> Int
9
+ addOne x = x + 1
You can’t perform that action at this time.
0 commit comments