What are the possibilities, if any, for getting offline docs for Haskell core libraries (and maybe more)?
Sometimes I take my laptop to the coffee-shop where there is no wifi, and it would be nice having something like Hoogle but for offline use.
What are the possibilities, if any, for getting offline docs for Haskell core libraries (and maybe more)?
Sometimes I take my laptop to the coffee-shop where there is no wifi, and it would be nice having something like Hoogle but for offline use.
Hoogle はオフラインで利用でき、Cabal からインストールできます: http://hackage.haskell.org/package/hoogle
使用方法はhttp://www.haskell.org/haskellwiki/Hoogle#Command_Line_Search_Flagsにあります。
使用法:
$ hoogle --help
Hoogle v4.2.8, (C) Neil Mitchell 2004-2011
http://haskell.org/hoogle
hoogle [COMMAND] ... [OPTIONS]
Commands:
[search] Perform a search
data Generate Hoogle databases
server Start a Hoogle server
combine Combine multiple databases into one
convert Convert an input file to a database
test Run tests
dump Dump sections of a database to stdout
rank Generate ranking information
log Analyse log files
Common flags:
-? --help Display help message
-V --version Print version information
-v --verbose Loud verbosity
-q --quiet Quiet verbosity
デフォルトのデータベースを作成しますhoogle data
(詳細はhttp://neilmitchell.blogspot.com/2008/08/hoogle-database-generation.htmlを参照)。
編集: Hoogle をローカルにインストールした後の使用セッション:
$ hoogle
No query entered
Try --help for command line options
$ hoogle data
(downloads databases...takes a few minutes)
ここでエラーが発生しました... どうやらそれは Cabal のバージョンに関連しているようですので、それを更新しました (http://hackage.haskell.org/trac/hackage/ticket/811)。それは役に立たなかったので、実行しhoogle data all
ましたが、時間がかかりすぎたのでキャンセルしました (Hackage のすべてのパッケージを通過するようです)。それでも、次のようなクエリは許可されませんが、hoogle map
許可hoogle map +base
されました (つまり、検索をパッケージに制限しbase
ます)。
EDIT2:これで問題が解決したようです(私にとって):
$cd .cabal/share/hoogle-4.2.8/databases
$hoogle combine base.hoo
$hoogle foldl\'
Data.List foldl' :: (a -> b -> a) -> a -> [b] -> a
Data.Foldable foldl' :: Foldable t => (a -> b -> a) -> a -> t b -> a
.tar.bz2
HTML ドキュメントは、Haskell の Web サイトからダウンロードできます。
https://downloads.haskell.org/~ghc/latest/docs/
https://www.haskell.org/ghc/docs/7.6.3/libraries.html.tar.bz2をダウンロードしましたが、まさに私が望んでいたものです。
Dash や Zeal などの他のオプションもあり、その reddit スレッドも参照してください。
Haskell Platform をインストールすると、GHC ドキュメントと GHC ライブラリ ドキュメント (コア ライブラリをカバーする) が含まれます。Windows では、[スタート] メニューの [すべてのプログラム | Haskell プラットフォーム] にあります。
~/.cabal/config ファイルを編集します。という行 (おそらくコメントアウトされている) を探しますdocumentation: False
。その行を に変更しdocumentation: True
、コメントを外します。これで、ドキュメントを含むプロジェクトをビルドするcabal install
と、ローカルにもビルドおよび保存されます。
同じ設定ファイルをもう少し調べてみると、doc-index-file、docdir、datadir、prefix などのオプションがあり、ドキュメントの保存場所を設定できます。
I use devdocs.io, it has docs for a lot of languages and libraries (including Haskell) and has an offline mode.
Velocityは、まさにそれを行うための無料で美しいユニバーサル ツールです。幅広い言語、テクノロジー、ライブラリをサポートし、ワンクリックで更新できます。
おそらく、既に使用しているものの多くをドキュメント リストで見つけることができるでしょう。
Windows の場合、cygwin の wget および curl パッケージをインストールします。有効になりhoogle data
ます。