dhall-lang / dhall-to-cabal

Compile Dhall expressions to Cabal files
MIT License
100 stars 19 forks source link

Set the default default-language to Haskell2010 #112

Closed quasicomputational closed 6 years ago

quasicomputational commented 6 years ago

This is another divergence from Cabal's defaults, but it's quite good for our usability. We can figure out a plan to deal with Haskell2020 or whatever when it comes.

ocharles commented 6 years ago

I'm not convinced it's a good idea for dhall-to-cabal to make these calls. I think an empty package should match an empty package in Cabal.

quasicomputational commented 6 years ago

Hmm. The boilerplate does annoy me. I'm not convinced people are bothered by a difference between what Cabal does on empty input and what package-description-generation tools do (e.g., hpack has very opinionated defaults and it seems to work well). It's not a disaster if you'd rather keep it with an empty default since I can just fork the defaults locally.

ocharles commented 6 years ago

Hmm. The boilerplate does annoy me

Then factor it out into a Dhall file :smile: You should be able to write your own more opinionated set of defaults, but I'm not sure it's dhall-ot-cabals place.

The hpack comparison is a fair point, and of course if the default isn't what someone wants then they will override the default as necessary. I'll have a think about this. But I do think the point of having a truly configurable format for Cabal files means that we don't need to form opinions.

quasicomputational commented 6 years ago

I'll open an issue to talk about ergonomics versus Cabal-faithfulness in defaults more generally.