Newbie question:
I like the ghci :set -haddock
option that allows :doc
to display function descriptions that has embedded in {- | ... -}
comments. I also like using :type ...
to show the type of an expression. Is there an option to cause Haddock to add the type signature to the comment displayed with :doc
, or is there something to use other than :doc
that would have the effect of displaying both the type and the description? It’s inconvenient to have to use :type
and :doc
separately. Or is there a way to define an abbreviation in ghci for “run :doc and :type on the same name”?
In my own code, I’ve been adding the type signature to the Haddock comments, but that’s redundant, and could accidentally lead to the documentation being out of sync with the function.
None of this is a big deal, but several minutes of searching turned up no answers, so I thought it wouldn’t hurt to ask.