user855443
user855443

Reputation: 2950

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.

Upvotes: 1

Views: 311

Answers (1)

duplode
duplode

Reputation: 34398

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

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

Upvotes: 2

Related Questions