简体   繁体   中英

exclude temporarily a file from a `stack build` when using hpack (package.yaml)

One may work on a haskell file in the source-dirs directory and decide for now not to include this file in a stack build . Is there a simple way to exclude temporarily the file form the build?

The obvious work-around is to move the file to another directory, but I hope this can be achieved inside hpack in a simple way which I did not find in the hpack docs.

Specifying the module under an always false conditional will make hpack's auto-discovery skip it:

when:
- condition: false
  other-modules: Excluded.Module

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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