Skip to content

Commit 2e56ed4

Browse files
committed
hls-gadt-plugin fixes
1 parent 6ed24b3 commit 2e56ed4

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

plugins/hls-gadt-plugin/src/Ide/Plugin/GHC.hs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,7 @@ prettyGADTDecl df decl =
213213
{ tcdDExt = adjustWhere tcdDExt
214214
, tcdDataDefn = tcdDataDefn
215215
{ dd_cons =
216-
#if MIN_VERSION_ghc(9,5,0)
217-
DataTypeCons False $
218-
#endif
219-
map adjustCon (extract_cons $ dd_cons tcdDataDefn)
216+
fmap adjustCon (dd_cons tcdDataDefn)
220217
}
221218
, ..
222219
}

plugins/hls-gadt-plugin/test/Main.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ tests = testGroup "GADT"
3535
, runTest "ConstructorContext" "ConstructorContext" 2 0 2 38
3636
, runTest "Context" "Context" 2 0 4 41
3737
, runTest "Pragma" "Pragma" 2 0 3 29
38-
, onlyWorkForGhcVersions (`elem`[GHC92, GHC94]) "Single deriving has different output on ghc9.2+" $
38+
, onlyWorkForGhcVersions (`elem`[GHC92, GHC94, GHC96]) "Single deriving has different output on ghc9.2+" $
3939
runTest "SingleDerivingGHC92" "SingleDerivingGHC92" 2 0 3 14
40-
, knownBrokenForGhcVersions [GHC92,GHC94] "Single deriving has different output on ghc9.2+" $
40+
, knownBrokenForGhcVersions [GHC92,GHC94,GHC96] "Single deriving has different output on ghc9.2+" $
4141
runTest "SingleDeriving" "SingleDeriving" 2 0 3 14
42-
, onlyWorkForGhcVersions (`elem`[GHC92, GHC94]) "only ghc-9.2+ enabled GADTs pragma implicitly" $
42+
, onlyWorkForGhcVersions (`elem`[GHC92, GHC94, GHC96]) "only ghc-9.2+ enabled GADTs pragma implicitly" $
4343
gadtPragmaTest "ghc-9.2 don't need to insert GADTs pragma" False
44-
, knownBrokenForGhcVersions [GHC92,GHC94] "ghc-9.2 has enabled GADTs pragma implicitly" $
44+
, knownBrokenForGhcVersions [GHC92,GHC94,GHC96] "ghc-9.2 has enabled GADTs pragma implicitly" $
4545
gadtPragmaTest "insert pragma" True
4646
]
4747

0 commit comments

Comments
 (0)