@@ -19,7 +19,7 @@ import GHC.Parser.Annotation (DeltaPos (..),
19
19
EpAnn (.. ),
20
20
EpAnnComments (EpaComments ))
21
21
#if MIN_VERSION_ghc(9,11,0)
22
- import GHC.Parser.Annotation (EpToken (.. ))
22
+ import GHC.Parser.Annotation (EpToken (.. ))
23
23
#endif
24
24
import Ide.PluginUtils (subRange )
25
25
import Language.Haskell.GHC.ExactPrint.Parsers (parseDecl )
@@ -49,9 +49,9 @@ import Language.Haskell.GHC.ExactPrint.Utils (showAst)
49
49
#endif
50
50
51
51
#if MIN_VERSION_ghc(9,11,0)
52
- import GHC.Types.SrcLoc (UnhelpfulSpanReason (.. ))
52
+ import GHC.Types.SrcLoc (UnhelpfulSpanReason (.. ))
53
53
#else
54
- import GHC.Parser.Annotation (AddEpAnn (.. ))
54
+ import GHC.Parser.Annotation (AddEpAnn (.. ))
55
55
#endif
56
56
57
57
type GP = GhcPass Parsed
@@ -220,7 +220,7 @@ prettyGADTDecl df decl =
220
220
adjustDataDecl DataDecl {.. } = DataDecl
221
221
{ tcdDExt = adjustWhere tcdDExt
222
222
, tcdDataDefn = tcdDataDefn
223
- {
223
+ {
224
224
#if MIN_VERSION_ghc(9,11,0)
225
225
dd_ext = adjustDefnWhere (dd_ext tcdDataDefn),
226
226
#endif
@@ -250,7 +250,7 @@ prettyGADTDecl df decl =
250
250
-- Adjust where annotation to the same line of the type constructor
251
251
#if MIN_VERSION_ghc(9,11,0)
252
252
-- tcdDext is just a placeholder in ghc-9.12
253
- adjustWhere tcdDExt = tcdDExt
253
+ adjustWhere = id
254
254
#else
255
255
adjustWhere tcdDExt = tcdDExt <&>
256
256
#if !MIN_VERSION_ghc(9,9,0)
@@ -269,7 +269,7 @@ prettyGADTDecl df decl =
269
269
| otherwise = annDataDefn {andd_where = andd_where'}
270
270
where
271
271
(EpTok (EpaSpan aw)) = andd_where annDataDefn
272
- andd_where' = EpTok (EpaDelta aw (SameLine 1 ) [] )
272
+ andd_where' = EpTok (EpaDelta aw (SameLine 1 ) [] )
273
273
#endif
274
274
-- Remove the first extra line if exist
275
275
removeExtraEmptyLine s = case stripInfix " \n\n " s of
0 commit comments