Haskelly icon indicating copy to clipboard operation
Haskelly copied to clipboard

Wish: Type hover shows doc comment

Open Rhywun opened this issue 6 years ago • 3 comments

Is it possible to display the source code's documentation comment (in addition to the type) within the popup that appears when I hover over an item in the editor? I am pretty new to Haskell so I'm not sure if this is even possible. Thank you

Rhywun avatar Mar 01 '18 02:03 Rhywun

Hello @Rhywun. You mean the actual Hoogle description of library functions?

martrik avatar May 11 '18 09:05 martrik

I was thinking of the comments that begin with -- | in source code, e.g. from module GHC.Num:

-- | Unary negation.
negate              :: a -> a

But I don't see any command to show a doc comment in GHC similar to :t which shows the type, so I suspect it isn't possible.

Rhywun avatar May 11 '18 13:05 Rhywun

I see what you mean. Yes I think the comments should be fetched from the Hoogle online documentation and parsed to then be displayed. We are not actively adding features to Haskelly but we do accept MRs. So if you feel like giving it a go feel free to contribute to the project!

martrik avatar May 11 '18 16:05 martrik