Skip to content

Commit bbfed6a

Browse files
committed
Use Avoid makeDeltaAst only for 9.10.0
1 parent fcc00d4 commit bbfed6a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plugins/hls-class-plugin/src/Ide/Plugin/Class/ExactPrint.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ import Control.Lens (_head, over)
2323
makeEditText :: Monad m => ParsedModule -> DynFlags -> AddMinimalMethodsParams -> MaybeT m (T.Text, T.Text)
2424
makeEditText pm df AddMinimalMethodsParams{..} = do
2525
mDecls <- MaybeT . pure $ traverse (makeMethodDecl df) methodGroup
26-
let ps = makeDeltaAst $ pm_parsed_source pm
26+
let ps =
27+
#if !MIN_VERSION_ghc(9,10,0) || MIN_VERSION_ghc(9,10,1)
28+
makeDeltaAst $
29+
#endif
30+
pm_parsed_source pm
2731

2832
old = T.pack $ exactPrint ps
2933
#if MIN_VERSION_ghc_exactprint(1,10,0)

0 commit comments

Comments
 (0)