Paths_pandoc.hs是如何生成的?
在项目 pandoc 中,Paths_pandoc 被导入到 Shared.hs 中。 Paths_pandoc.hs 位于 dist/build/autogen/ 中。它是如何生成的以及它对pandoc有什么作用。
In the project pandoc, Paths_pandoc is imported in Shared.hs. Paths_pandoc.hs is located in dist/build/autogen/. How is it generated and what does it do for pandoc.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是由 Cabal 生成的文件。
当您在项目的
.cabal
文件中指定Data-files:
时,运行时这些文件将被复制到系统上“数据文件”的合适位置阴谋安装
。在 Windows 上,这可能是“C:\Program Files\Something”,在 Linux 上,它可能是“/usr/share/something”(至少当您执行--system
安装时)。您的代码需要知道文件被复制到哪里,因此 Cabal 生成该特殊模块,其中包含用于复制数据文件的安装路径的变量,以便您的代码可以找到已安装的数据文件。
该模块还包含 Cabal 为您提供的其他信息,但该模块的主要目的就是我刚才描述的。
有关详细信息,请参阅此博文。
It's a file that is generated by Cabal.
When you specify
Data-files:
in your.cabal
file for your project, those files will be copied to a good location for "data files" on your system when you runcabal install
. On Windows, this might be "C:\Program Files\Something" and on Linux it might be "/usr/share/something" (At least when you do a--system
install).Your code needs to know where the files were copied to, so Cabal generates that special module, which contains variables for the install paths that were used to copy the data files, so that your code can find the installed data files.
The module does also contain other information that Cabal provides for you, but the primary purpose of the module is what I just described.
See this blog post for more information.