Haskell如何处理文档? [英] How does Haskell deal with documentation?

查看:159
本文介绍了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>。

Currently, there is no way to view the Haddock documentation within ghci, but there is a ticket for it.

然而,您可以使用:info 命令获取一小部分信息,例如

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如何处理文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆