LeventErkok / sbv

SMT Based Verification in Haskell. Express properties about Haskell programs and automatically prove them using SMT solvers.
https://github.com/LeventErkok/sbv
Other
239 stars 33 forks source link

Create dedicated cabal target for examples #676

Closed 414owen closed 9 months ago

414owen commented 9 months ago

Sorry for the drive-by issue creation - I'm not a real user of sbv. I just realised, when building a large enough subset of hackage to test a change, that sbv seemed to take an unusually long time to compile.

It looks like the example modules are exposed in the library of sbv. This means that the examples get linked into binaries that use sbv and are loaded into memory when the programs are run. I think that creating an examples library, that depends on the sbv library would solve this? It would also take less time for people to compile sbv as a library,

LeventErkok commented 9 months ago

This was discussed before at https://github.com/LeventErkok/sbv/issues/659

And for the reasons cited there, I'm not terribly excited about this idea. For individual users (that only have a few dependencies) extra cost should be minimal. For someone compiling hackage, I guess you already are committing so much resources so I don't see how this separation will make any change to your bottom line..

I don't expect everyone to agree with my view on this, but the cost of maintenance is really high for me for separate packages.

414owen commented 9 months ago

I think that if the test suite imports the Documentation/examples cabal target, then there won't be a problem with examples getting out of sync.

Personally, I think that reducing iteration time (building the library) is quite valuable for maintenance.

But maybe your workflow is different somehow :)

LeventErkok commented 9 months ago

Thanks for the advice. I’ll consider it. I’m kind of fond of having documentation show up in hackage prominently, so that’s another consideration.