gpt4 book ai didi

haskell - 包括嵌入 Cabal 的文本文件

转载 作者:行者123 更新时间:2023-12-02 15:51:40 25 4
gpt4 key购买 nike

我正在构建一个库,其中包含一些使用 Template Haskell 和文件嵌入的非常大的字符串。

我想知道,当我运行 Cabal dist 时如何确保包含这些文件?

它们都位于名为 core 的文件夹中,但有些位于 core 的子目录中。

最佳答案

Cabal 有一个 extra-source-files 字段,正是针对这些场景:

Extra-source-files: relative/path/to/my/embedded-file.txt

引用Cabal User Guide :

extra-source-files: filename list

A list of additional files to be included in source distributions built with setup sdist.

As withdata-filesit can use a limited form of wildcards in file names.

关于haskell - 包括嵌入 Cabal 的文本文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26957820/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com