File tree 2 files changed +16
-8
lines changed 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -559,7 +559,7 @@ missingPragmaTests = testGroup "missing pragma warning code actions" [
559
559
_ <- waitForDiagnosticsFrom doc
560
560
cas <- map fromAction <$> getAllCodeActions doc
561
561
562
- liftIO $ " Add \" TypeApplications \" " `elem` map (^. L. title) cas @? " Contains TypeApplications code action"
562
+ liftIO $ " Add \" NamedFieldPuns \" " `elem` map (^. L. title) cas @? " Contains NamedFieldPuns code action"
563
563
564
564
executeCodeAction $ head cas
565
565
@@ -569,12 +569,16 @@ missingPragmaTests = testGroup "missing pragma warning code actions" [
569
569
[ " #! /usr/bin/env nix-shell"
570
570
, " #! nix-shell --pure -i runghc -p \" haskellPackages.ghcWithPackages (hp: with hp; [ turtle ])\" "
571
571
, " "
572
- , " {-# LANGUAGE ScopedTypeVariables #-}"
573
- , " {-# LANGUAGE TypeApplications #-}"
572
+ , " {-# LANGUAGE NamedFieldPuns #-}"
574
573
, " module AfterShebang where"
575
574
, " "
576
- , " foo :: forall a. a -> a"
577
- , " foo = id @a"
575
+ , " data Record = Record"
576
+ , " { a :: Int,"
577
+ , " b :: Double,"
578
+ , " c :: String"
579
+ , " }"
580
+ , " "
581
+ , " f Record{a, b} = a"
578
582
]
579
583
580
584
liftIO $ T. lines contents @?= expected
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env nix-shell
2
2
#! nix-shell --pure -i runghc -p "haskellPackages.ghcWithPackages (hp: with hp; [ turtle ])"
3
3
4
- {-# LANGUAGE ScopedTypeVariables #-}
5
4
module AfterShebang where
6
5
7
- foo :: forall a . a -> a
8
- foo = id @ a
6
+ data Record = Record
7
+ { a :: Int ,
8
+ b :: Double ,
9
+ c :: String
10
+ }
11
+
12
+ f Record {a, b} = a
You can’t perform that action at this time.
0 commit comments