Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Will users be diverted from a package if it's not passing `cabal check` for `cabal` `1.22` due to the absence of `Setup.hs`?

Tags:

haskell

cabal

stack new usually creates a default Setup.hs file. I removed it from a project and it still builds alright for any lts resolver down to lts-2. It also passes cabal check at least for cabal version 1.24. (Though not for cabal 1.22.)

Can I conclude from this result that including a default Setup.hs in a project is not trendy anymore and I can drop it? In particular, will many prospective users be diverted from installing the package if it's not passing cabal check for cabal 1.22?

P.S. This question is more specific than the other, similar one in that I want to know, specifically, if the package not passing cabal check for a certain version of cabal due to the absence of an otherwise unnecessary Setup.hs will be counted against that package in some situations, and whether there are any other downsides to not having a Setup.hs in a project, considering the current state of the Haskell ecosystem. Whether a Setup.hs is necessary or useful overall is not a question here.

like image 649
Ignat Insarov Avatar asked Oct 04 '17 06:10

Ignat Insarov


1 Answers

If you run cabal sdist on a project without a Setup.hs file, cabal creates one for you -- try it!

As such, there's no point to removing the file, because it will just get regenerated when you package for distribution anyway.

like image 162
sclv Avatar answered Nov 16 '22 16:11

sclv