cabalism / hpack-dhall

Use hpack's phrasing in dhall to write cabal files
BSD 3-Clause "New" or "Revised" License
31 stars 3 forks source link

Add option to specify output directory for cabal file #38

Closed locallycompact closed 1 year ago

locallycompact commented 1 year ago

I'm dealing with a situation where the dhall is coming from nowhere in particular, but the cabal file needs to be put in a particular directory. Does hpack even allow this? I know it can output to stdout.

philderbeast commented 1 year ago

I've only ever put the package.dhall in the folder where I want to generate the cabal file. Can you write it there temporarily? It doesn't have to be named package.yaml.

philderbeast commented 1 year ago

Another thing if using dhall-hpack-cabal is you can import another *.dhall file from pretty much anywhere.

locallycompact commented 1 year ago

Actually maybe I can put it there temporarily actually, might be overthinking this.

philderbeast commented 1 year ago

I'd have to check but I'm pretty sure that some of hpack features like module discovery rely on relative locality in the filesystem.

locallycompact commented 1 year ago

Oh of course, it must do. Thanks.