on master help sign in
Fewer orphan instances in hie-core (#1984)
9308740Neil Mitchell
src/Development/IDE/GHC/Orphans.hs−1
@@ -33,7 +33,6 @@ instance Show Module where
33 show = moduleNameString . moduleName
33 show = moduleNameString . moduleName
34
34
35instance Show (GenLocated SrcSpan ModuleName) where show = prettyPrint
35instance Show (GenLocated SrcSpan ModuleName) where show = prettyPrint
36−instance Show Name where show = prettyPrint
37
36
38instance NFData (GenLocated SrcSpan ModuleName) where
37instance NFData (GenLocated SrcSpan ModuleName) where
39 rnf = rwhnf
38 rnf = rwhnf
src/Development/IDE/Spans/AtPoint.hs+1−1
@@ -86,7 +86,7 @@ atPoint IdeOptions{..} tcs srcSpans pos = do
86 isTypeclassDeclSpan :: SpanInfo -> Bool
86 isTypeclassDeclSpan :: SpanInfo -> Bool
87 isTypeclassDeclSpan spanInfo =
87 isTypeclassDeclSpan spanInfo =
88 case getNameM (spaninfoSource spanInfo) of
88 case getNameM (spaninfoSource spanInfo) of
89− Just name -> any (`isInfixOf` show name) ["==", "showsPrec"]
89+ Just name -> any (`isInfixOf` getOccString name) ["==", "showsPrec"]
90 Nothing -> False
90 Nothing -> False
91
91
92locationsAtPoint :: forall m . MonadIO m => (FilePath -> m (Maybe HieFile)) -> IdeOptions -> HscEnv -> Position -> [SpanInfo] -> m [Location]
92locationsAtPoint :: forall m . MonadIO m => (FilePath -> m (Maybe HieFile)) -> IdeOptions -> HscEnv -> Position -> [SpanInfo] -> m [Location]