haskell / math-functions

Special mathematical functions
http://hackage.haskell.org/package/math-functions
BSD 2-Clause "Simplified" License
40 stars 28 forks source link

Declare needed extensions #30

Closed hvr closed 8 years ago

hvr commented 8 years ago

Declare which extensions the compiler needs to support a LANGUAGE pragma for.

This is important for the cabal solver so it can backtrack to an older version of math-functions if e.g. TemplateHaskell is not supported.

hvr commented 8 years ago

NB: other-extensions does not enable extensions (default-extension would enable the listed extensions)

treeowl commented 8 years ago

I had no idea that existed. containers needs CPP and BangPatterns everywhere, and I think also ScopedTypeVariables, but that last should really be under some CPP.

hvr commented 8 years ago

PS: I've edited versions 0.1.5.1, 0.1.5.2, 0.1.6.0, 0.1.7.0 on Hackage to declare other-extensions, as only those versions require TH

and with that on a TH-less arch, we can now say cabal install math-functions and cabal (starting with version 1.24.0.0) happily backtracks to pick the most recent version which didn't require TH yet:

Choosing modular solver.
Resolving dependencies...
In order, the following would be installed:
erf-2.0.0.0 (via: math-functions-0.1.4.0) (new package)
vector-0.11.0.0 (via: math-functions-0.1.4.0) (new package)
math-functions-0.1.4.0 (latest: 0.1.7.0) (new package)
Shimuuar commented 8 years ago

Thank you! Merged. New release is not needed am I right?

hvr commented 8 years ago

@Shimuuar indeed, new release not needed; btw, you may want to try to remove the CPP pragma... I think it's become redundant by now