atom-haskell-archive / haskell-ghc-mod

haskell-ghc-mod atom package
https://atom.io/packages/haskell-ghc-mod
MIT License
69 stars 20 forks source link

Haddock documentation view at the top of type info hints #193

Closed varosi closed 7 years ago

varosi commented 7 years ago

It'll be very useful if there is a way to show Haddock documentation for the given symbol on top of type info hints. I don't know how this could be done. May be using directly Haddock or via Hoogle?

varosi commented 7 years ago

I found related issue in other project: https://github.com/atom-haskell/ide-haskell/issues/169 So I think this is duplicate.

lierdakil commented 7 years ago

Some preliminary work on the subject is in ide-haskell-hoogle package (which uses hoogle for doc lookups). But full support is impossible without imported-from feature in ghc-mod, which still needs some work. Showing haddock output in tooltips doesn't sound like a particularly good idea though.

чт, 19 янв. 2017 г., 23:11 varosi notifications@github.com:

I found related issue in other project: atom-haskell/ide-haskell#169 https://github.com/atom-haskell/ide-haskell/issues/169 So I think this is duplicate.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/atom-haskell/haskell-ghc-mod/issues/193#issuecomment-273885003, or mute the thread https://github.com/notifications/unsubscribe-auth/AG8EZhVp3jhNcYbwId_haT80blHIFeBNks5rT8NhgaJpZM4LojAP .

varosi commented 7 years ago

I mean at least function comments to be visible in hints.

lierdakil commented 7 years ago

You mean docstrings? Those can be a screen long.

varosi commented 7 years ago

I mean if a function is defined like that:

-- | My documentation
myFunc :: Int -> Int

To see "My documentation" inside hints. If it's too long - it could be truncated to 3-4 lines.