Skip to content

Commit

Permalink
HlsClassPlugin: fixes parsing diagnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
dsaenztagarro committed Jul 6, 2024
1 parent fff2c5e commit 9bd316a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/hls-class-plugin/src/Ide/Plugin/Class/CodeAction.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE RecordWildCards #-}
Expand Down Expand Up @@ -203,7 +204,11 @@ isClassNodeIdentifier (Right i) ident | 'C':':':_ <- unpackFS $ occNameFS $ occ
isClassNodeIdentifier _ _ = False

isClassMethodWarning :: T.Text -> Bool
#if MIN_VERSION_ghc(9,8,0)
isClassMethodWarning = T.isPrefixOf "No explicit implementation for"
#else
isClassMethodWarning = T.isPrefixOf "• No explicit implementation for"
#endif

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

0 comments on commit 9bd316a

Please sign in to comment.