如何在软件包安装后添加文档? [英] How to add documentation after packages have already been installed?

查看:160
本文介绍了如何在软件包安装后添加文档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在快照数据库中安装了一堆软件包。我现在想要他们的文档的本地副本(如果是超链接源代码)。有没有一种方法可以告诉 stack 运行 haddock 所有这些方法?



编辑(从我的答案中复制):

看起来,明显的 stack haddock包将安装包的haddock,所以

  $ cd〜/ .stack / snapshots / x86_64-linux / lts-3.0 / 7.10.2 / doc 
$ stack haddock *

似乎正在做我想做的事,两个缺点:$ b​​
$ b


  1. 我仍然需要记住传递 - haddock 标记为每个构建(没有〜/ .stack / config 文件,是否存在?)

  2. 似乎要重建它们;有没有办法避免这种情况?


解决方案

c> stack haddock package 将安装包的haddock,所以

  $ cd〜/ .stack /snapshots/x86_64-linux/lts-3.0/7.10.2/doc 
$ stack haddock *

我还是需要记住要传递 - haddock 标记为每个构建(不存在〜/ .stack / config 文件,有吗?)

  • 它似乎重建了它们;有没有办法避免这种情况?


  • I have installed a bunch of packages to the snapshot database. I would now like a local copy of their documentation (even better if it's with hyperlinked source). Is there a way I can tell stack to run haddock on all of them?

    EDIT (copied from my answer):

    It seems that the obvious stack haddock package will install haddock for the package, so

    $ cd ~/.stack/snapshots/x86_64-linux/lts-3.0/7.10.2/doc
    $ stack haddock *
    

    seems to do what I want, with two downsides:

    1. I'll still need to remember to pass the --haddock flag to every build (there isn't a ~/.stack/config file, is there?)
    2. It seems to rebuild them; is there a way to avoid that?

    解决方案

    It seems that the obvious stack haddock package will install haddock for the package, so

    $ cd ~/.stack/snapshots/x86_64-linux/lts-3.0/7.10.2/doc
    $ stack haddock *
    

    seems to do what I want, with two downsides:

    1. I'll still need to remember to pass the --haddock flag to every build (there isn't a ~/.stack/config file, is there?)
    2. It seems to rebuild them; is there a way to avoid that?

    这篇关于如何在软件包安装后添加文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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