goldfirere / units

The home of the units Haskell package
94 stars 19 forks source link

Update tests to v2.0 of units-defs #44

Closed DougBurke closed 9 years ago

DougBurke commented 9 years ago

With these changes I could get the tests to pass with the latest version of units-defs. I originally noticed the need for this when trying to replicate Tests/Physical.hs and found that

import qualified Data.Metrology.SI.Dims as D

no-longer worked.

This is not a complete conversion since I ended up commenting-out the tests in Tests/Travel.hs as I do not know how to replace the Imperial LCSU from the old units-defs.

DougBurke commented 9 years ago

It looks like the test failures for @da9fef1 are down to issues related to the cabal sdist step in the test (which could be related to the submodule update of units-defs), rather than a problem with the code itself (ignoring the 7.10 failure).

goldfirere commented 9 years ago

Many thanks for submitting this PR. The cabal sdist problem is due to an outdated units.cabal file, which is trying to grab all the units-defs stuff so that downloaders can test. It's a legitimate bug (again, ignoring the GHC panic, which has been reported as GHC bug #10058). I would want the Travel test updated, but I'm really squeezed against a deadline right now and will take a look at this in two weeks or so.

I do appreciate your participation here! Thanks!

DougBurke commented 9 years ago

There's no rush; or at least, I'm not in a hurry!

DougBurke commented 9 years ago

I've put the Travel tests back in by copying over the Imperial LCSU (or at least, the relevant parts of it) from version 1.1 of units-defs into Trave.hs, and then adding in a scale factor to account for the change in the definition of the gallon (British to US). Hope this makes sense!