Fewer orphan instances in hie-core (#1984)
* Get rid of orphan usage in Convert
* Get rid of orphan usage in AtPoint
* Delete one entirely unused orphan
* Remove a comment that is no longer true
commit93087407738a50e290e5423b7a91c6c872205924
authorNeil Mitchell <35463327+neil-da@users.noreply.github.com>
dateWed 3 Jul 2019, 12:01 (7 years ago)
parent4a9010b
src/Development/IDE/GHC/Orphans.hs−1
@@ -33,7 +33,6 @@ instance Show Module where
3333 show = moduleNameString . moduleName
3434
3535instance Show (GenLocated SrcSpan ModuleName) where show = prettyPrint
36−instance Show Name where show = prettyPrint
3736
3837instance NFData (GenLocated SrcSpan ModuleName) where
3938 rnf = rwhnf
src/Development/IDE/Spans/AtPoint.hs+1−1
@@ -86,7 +86,7 @@ atPoint IdeOptions{..} tcs srcSpans pos = do
8686 isTypeclassDeclSpan :: SpanInfo -> Bool
8787 isTypeclassDeclSpan spanInfo =
8888 case getNameM (spaninfoSource spanInfo) of
89− Just name -> any (`isInfixOf` show name) ["==", "showsPrec"]
89+ Just name -> any (`isInfixOf` getOccString name) ["==", "showsPrec"]
9090 Nothing -> False
9191
9292locationsAtPoint :: forall m . MonadIO m => (FilePath -> m (Maybe HieFile)) -> IdeOptions -> HscEnv -> Position -> [SpanInfo] -> m [Location]