本文介绍了Haskell如何处理文档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Haskell中的文档的任何模式和实践?
有没有什么像Python在下面那样优雅/方便?
Any pattern&practise here for documentation in Haskell?
Are there anything as elegant/handy as what Python does below?
>>> help([].count)
Help on built-in function count:
count(...)
L.count(value) -> integer -- return number of occurrences of value
推荐答案
目前,没有办法在ghci内查看Haddock文档,但是有一张机票a>。
You can however get a small bit of info using the :info
command, e.g.
ghci> :i nub
nub :: (Eq a) => [a] -> [a] -- Defined in Data.List
so that you at least know where to look for the documentation for a particular function.
这篇关于Haskell如何处理文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!