Skip to content

Commit 56acfe6

Browse files
committed
HlsClassPlugin: fixes parsing diagnostic
1 parent fff2c5e commit 56acfe6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE GADTs #-}
23
{-# LANGUAGE OverloadedLists #-}
34
{-# LANGUAGE RecordWildCards #-}
@@ -203,7 +204,11 @@ isClassNodeIdentifier (Right i) ident | 'C':':':_ <- unpackFS $ occNameFS $ occ
203204
isClassNodeIdentifier _ _ = False
204205

205206
isClassMethodWarning :: T.Text -> Bool
207+
#if MIN_VERSION_ghc(9,8,0)
208+
isClassMethodWarning = T.isPrefixOf "No explicit implementation for"
209+
#else
206210
isClassMethodWarning = T.isPrefixOf "• No explicit implementation for"
211+
#endif
207212

208213
isInstanceValBind :: ContextInfo -> Bool
209214
isInstanceValBind (ValBind InstanceBind _ _) = True
@@ -242,4 +247,3 @@ minDefToMethodGroups hsc gblEnv range sigs minDef = makeMethodGroup <$> go minDe
242247
go (Or ms) = concatMap (go . unLoc) ms
243248
go (And ms) = foldr (liftA2 (<>) . go . unLoc) [[]] ms
244249
go (Parens m) = go (unLoc m)
245-

0 commit comments

Comments
 (0)