mirror of
https://github.com/haskell/ghcide.git
synced 2024-12-15 04:43:41 +03:00
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
This commit is contained in:
parent
4a9010ba10
commit
9308740773
@ -33,7 +33,6 @@ instance Show Module where
|
||||
show = moduleNameString . moduleName
|
||||
|
||||
instance Show (GenLocated SrcSpan ModuleName) where show = prettyPrint
|
||||
instance Show Name where show = prettyPrint
|
||||
|
||||
instance NFData (GenLocated SrcSpan ModuleName) where
|
||||
rnf = rwhnf
|
||||
|
@ -86,7 +86,7 @@ atPoint IdeOptions{..} tcs srcSpans pos = do
|
||||
isTypeclassDeclSpan :: SpanInfo -> Bool
|
||||
isTypeclassDeclSpan spanInfo =
|
||||
case getNameM (spaninfoSource spanInfo) of
|
||||
Just name -> any (`isInfixOf` show name) ["==", "showsPrec"]
|
||||
Just name -> any (`isInfixOf` getOccString name) ["==", "showsPrec"]
|
||||
Nothing -> False
|
||||
|
||||
locationsAtPoint :: forall m . MonadIO m => (FilePath -> m (Maybe HieFile)) -> IdeOptions -> HscEnv -> Position -> [SpanInfo] -> m [Location]
|
||||
|
Loading…
Reference in New Issue
Block a user