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 @@ -220,7 +220,7 @@ atPoint IdeOptions{} (HAR _ hf _ _ (kind :: HieKind hietype)) (DKMap dm km) env
220
220
hoverInfo :: HieAST hietype -> IO (Maybe Range , [T. Text ])
221
221
hoverInfo ast = do
222
222
prettyNames <- mapM prettyName filteredNames
223
- instances <- catMaybes <$> mapM prettyInstances filteredNames
223
+ instances <- catMaybes <$> mapM ( either ( const $ pure Nothing ) prettyInstances . fst ) filteredNames
224
224
pure (Just range, prettyNames ++ pTypes ++ instances)
225
225
where
226
226
pTypes :: [T. Text ]
@@ -309,8 +309,8 @@ atPoint IdeOptions{} (HAR _ hf _ _ (kind :: HieKind hietype)) (DKMap dm km) env
309
309
UnhelpfulLoc {} | isInternalName name || isSystemName name -> Nothing
310
310
_ -> Just $ " *Defined " <> printOutputable (pprNameDefnLoc name) <> " *"
311
311
312
- prettyInstances :: ( Either ModuleName Name , IdentifierDetails hietype ) -> IO (Maybe T. Text )
313
- prettyInstances ( Right n, _) =
312
+ prettyInstances :: Name -> IO (Maybe T. Text )
313
+ prettyInstances n =
314
314
fmap (wrapHaskell . T. unlines . fmap printOutputable) <$> instancesForName
315
315
where
316
316
instancesForName :: IO (Maybe [ClsInst ])
@@ -327,7 +327,6 @@ atPoint IdeOptions{} (HAR _ hf _ _ (kind :: HieKind hietype)) (DKMap dm km) env
327
327
PatSynCon _ -> Nothing
328
328
RealDataCon dc -> Just $ mkTyConTy $ dataConTyCon dc
329
329
tyThingAsDataType (ATyCon tc) = Just $ mkTyConTy tc
330
- prettyInstances (Left _, _) = pure Nothing
331
330
332
331
typeLocationsAtPoint
333
332
:: forall m
You can’t perform that action at this time.
0 commit comments