File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
ghcide/src/Development/IDE/Spans Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -222,7 +222,7 @@ atPoint IdeOptions{} (HAR _ hf _ _ (kind :: HieKind hietype)) (DKMap dm km) env
222
222
hoverInfo :: HieAST hietype -> IO (Maybe Range , [T. Text ])
223
223
hoverInfo ast = do
224
224
prettyNames <- mapM prettyName filteredNames
225
- instances <- catMaybes <$> mapM prettyInstances filteredNames
225
+ instances <- catMaybes <$> mapM ( either ( const $ pure Nothing ) prettyInstances . fst ) filteredNames
226
226
pure (Just range, prettyNames ++ pTypes ++ instances)
227
227
where
228
228
pTypes :: [T. Text ]
@@ -311,8 +311,8 @@ atPoint IdeOptions{} (HAR _ hf _ _ (kind :: HieKind hietype)) (DKMap dm km) env
311
311
UnhelpfulLoc {} | isInternalName name || isSystemName name -> Nothing
312
312
_ -> Just $ " *Defined " <> printOutputable (pprNameDefnLoc name) <> " *"
313
313
314
- prettyInstances :: ( Either ModuleName Name , IdentifierDetails hietype ) -> IO (Maybe T. Text )
315
- prettyInstances ( Right n, _) =
314
+ prettyInstances :: Name -> IO (Maybe T. Text )
315
+ prettyInstances n =
316
316
fmap (wrapHaskell . T. unlines . fmap printOutputable) <$> instancesForName
317
317
where
318
318
instancesForName :: IO (Maybe [ClsInst ])
@@ -329,7 +329,6 @@ atPoint IdeOptions{} (HAR _ hf _ _ (kind :: HieKind hietype)) (DKMap dm km) env
329
329
PatSynCon _ -> Nothing
330
330
RealDataCon dc -> Just $ mkTyConTy $ dataConTyCon dc
331
331
tyThingAsDataType (ATyCon tc) = Just $ mkTyConTy tc
332
- prettyInstances (Left _, _) = pure Nothing
333
332
334
333
typeLocationsAtPoint
335
334
:: forall m
You can’t perform that action at this time.
0 commit comments