File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
ghcide/src/Development/IDE/Spans Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -209,12 +209,12 @@ atPoint
209
209
-> Maybe (Maybe Range , [T. Text ])
210
210
atPoint IdeOptions {} (HAR _ hf _ _ kind) (DKMap dm km) env pos = listToMaybe $ pointCommand hf pos hoverInfo
211
211
where
212
- -- Hover info for values/data
212
+ -- | Get hover info for values/data
213
213
hoverInfo ast = (Just range, prettyNames ++ pTypes)
214
214
where
215
215
pTypes
216
- | Prelude. length names == 1 = dropEnd1 $ map wrapHaskell prettyTypes
217
- | otherwise = map wrapHaskell prettyTypes
216
+ | Prelude. length names == 1 = dropEnd1 $ map wrapHaskell prettyConcreteTypes
217
+ | otherwise = map wrapHaskell prettyConcreteTypes
218
218
219
219
range = realSrcSpanToRange $ nodeSpan ast
220
220
@@ -242,11 +242,13 @@ atPoint IdeOptions{} (HAR _ hf _ _ kind) (DKMap dm km) env pos = listToMaybe $ p
242
242
version = T. pack $ showVersion (unitPackageVersion conf)
243
243
pure $ " *(" <> pkgName <> " -" <> version <> " )*"
244
244
245
- prettyTypes = map ((" _ :: " <> ) . prettyType) types
246
245
prettyType t = case kind of
247
246
HieFresh -> showGhc t
248
247
HieFromDisk full_file -> showGhc $ hieTypeToIface $ recoverFullType t (hie_types full_file)
249
248
249
+ -- | Local inferred most concrete type signature.
250
+ prettyConcreteTypes = map ((" _ :: " <> ) . prettyType) types
251
+
250
252
definedAt name =
251
253
-- do not show "at <no location info>" and similar messages
252
254
-- see the code of 'pprNameDefnLoc' for more information
You can’t perform that action at this time.
0 commit comments