@@ -19,7 +19,7 @@ import GHC.Parser.Annotation (DeltaPos (..),
1919 EpAnn (.. ),
2020 EpAnnComments (EpaComments ))
2121#if MIN_VERSION_ghc(9,11,0)
22- import GHC.Parser.Annotation (EpToken (.. ))
22+ import GHC.Parser.Annotation (EpToken (.. ))
2323#endif
2424import Ide.PluginUtils (subRange )
2525import Language.Haskell.GHC.ExactPrint.Parsers (parseDecl )
@@ -49,9 +49,9 @@ import Language.Haskell.GHC.ExactPrint.Utils (showAst)
4949#endif
5050
5151#if MIN_VERSION_ghc(9,11,0)
52- import GHC.Types.SrcLoc (UnhelpfulSpanReason (.. ))
52+ import GHC.Types.SrcLoc (UnhelpfulSpanReason (.. ))
5353#else
54- import GHC.Parser.Annotation (AddEpAnn (.. ))
54+ import GHC.Parser.Annotation (AddEpAnn (.. ))
5555#endif
5656
5757type GP = GhcPass Parsed
@@ -220,7 +220,7 @@ prettyGADTDecl df decl =
220220 adjustDataDecl DataDecl {.. } = DataDecl
221221 { tcdDExt = adjustWhere tcdDExt
222222 , tcdDataDefn = tcdDataDefn
223- {
223+ {
224224#if MIN_VERSION_ghc(9,11,0)
225225 dd_ext = adjustDefnWhere (dd_ext tcdDataDefn),
226226#endif
@@ -250,7 +250,7 @@ prettyGADTDecl df decl =
250250 -- Adjust where annotation to the same line of the type constructor
251251#if MIN_VERSION_ghc(9,11,0)
252252 -- tcdDext is just a placeholder in ghc-9.12
253- adjustWhere tcdDExt = tcdDExt
253+ adjustWhere = id
254254#else
255255 adjustWhere tcdDExt = tcdDExt <&>
256256#if !MIN_VERSION_ghc(9,9,0)
@@ -269,7 +269,7 @@ prettyGADTDecl df decl =
269269 | otherwise = annDataDefn {andd_where = andd_where'}
270270 where
271271 (EpTok (EpaSpan aw)) = andd_where annDataDefn
272- andd_where' = EpTok (EpaDelta aw (SameLine 1 ) [] )
272+ andd_where' = EpTok (EpaDelta aw (SameLine 1 ) [] )
273273#endif
274274 -- Remove the first extra line if exist
275275 removeExtraEmptyLine s = case stripInfix " \n\n " s of
0 commit comments