cartazio / numbers

Other
29 stars 13 forks source link

Use a consistent Ord instance for BigFloat, other minor fixes. #1

Closed orlitzky closed 11 years ago

orlitzky commented 11 years ago
DanBurton commented 11 years ago

I've merged it, but I don't like the new dependencies on QuickCheck & friends for building the library. I'm going to separate the library from the test code so that people can install just the library without the additional dependencies.

orlitzky commented 11 years ago

Thanks, I don't like them either, but I've asked around and the three options seem to be,

  1. Put the tests in the module with the code. Allows testing of internal functions, but requires the test libs to build.
  2. Put the tests in a separate module. Doesn't require test libs to build, but you have to export everything you want to test.
  3. Use the preprocessor to export everything when testing. Unspeakably ugly.

I tend to prefer (1), but the benefits don't exist until someone writes some internal tests, so do whatever =)

DanBurton commented 11 years ago

The reason I chose Option 2 for this package is because it's not really mine, and I didn't want to force the extra dependencies on users of the package. Option 3 doesn't seem that bad to me; you can just export the extra things you want to test. Option 1 isn't all that bad, but personally I'd avoid doing it until all of the testing dependencies are in the Haskell Platform (right now only quick check is, iinm). Dependency hell is not fun.