简体   繁体   English

什么是最小的 stack.yaml 文件?

[英]what goes into a minimal stack.yaml file?

I have projects compiling with cabal build (but using hpack for the convenience).我有使用cabal build编译的项目(但为了方便起见使用hpack )。 For some reason, I would like to compile them with stack build .出于某种原因,我想用stack build编译它们。 What goes into a minimal stack.yaml file?什么是最小的stack.yaml文件?

The stack documentation gives details what goes into such a file, but does not show a minimal (or any, as much as I can see) example.堆栈文档详细说明了此类文件中的内容,但没有显示最小(或任何我能看到的)示例。 I fear to use stack init on an existing project for unintended consequences.我担心在现有项目上使用stack init会产生意想不到的后果。

What is a small example from which to go?有什么小例子可以借鉴?

A minimal stack.yaml :一个最小的stack.yaml

resolver: lts-19.16 # for ghc 9.0.2 newest lts

packages:
- .

A not-so minimal skeleton from which to expand:一个不那么最小的骨架,可以从中扩展:

resolver: lts-19.16 # for ghc 9.0.2 newest lts

packages:
- .
 
extra-deps:  # include here other local packages

ghc-options:
  "$everything": -haddock # to produce documentation with haddock

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM