Skip to content

Commit d92c3a0

Browse files
committed
Attempt to fix #4731
1 parent b3e29e1 commit d92c3a0

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ makeEditText :: Monad m => ParsedModule -> DynFlags -> AddMinimalMethodsParams -
2424
makeEditText pm df AddMinimalMethodsParams{..} = do
2525
mDecls <- MaybeT . pure $ traverse (makeMethodDecl df) methodGroup
2626
let ps =
27-
#if !MIN_VERSION_ghc(9,9,0)
2827
makeDeltaAst $
29-
#endif
3028
pm_parsed_source pm
3129

3230
old = T.pack $ exactPrint ps

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ codeActionTests = testGroup
4444
, "Add placeholders for all missing methods"
4545
, "Add placeholders for all missing methods with signature(s)"
4646
]
47+
, goldenWithClass "Creates a placeholder for '<>'" "T8" "diamond" $
48+
getActionByTitle "Add placeholders for '<>'"
4749
, goldenWithClass "Creates a placeholder for '=='" "T1" "eq" $
4850
getActionByTitle "Add placeholders for '=='"
4951
, goldenWithClass "Creates a placeholder for '/='" "T1" "ne" $
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
data Set a = Set
2+
3+
instance Semigroup (Set a) where
4+
(<>) = _
5+
6+
instance Monoid (Set a) where
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
data Set a = Set
2+
3+
instance Semigroup (Set a) where
4+
5+
instance Monoid (Set a) where

0 commit comments

Comments
 (0)