Commit Graph

3 Commits

Author SHA1 Message Date
Simon Marlow
3dbb11f6fe Cleanup and fix builds with other GHC versions
Summary:
Now that the Haxl 2 diff has landed, I wanted to take the opportunity to reorganise the codebase.

I split parts of `Haxl.Core.Types` out into

* `Haxl.Core.Flags`, the `Flags` type and functions
* `Haxl.Core.DataSource`: the `DataSource` class and related stuff

and I split the massive `Haxl.Core.Monad` module into smaller modules:

* the base `Haxl.Core.Monad` with the types and instances
* `Haxl.Core.Fetch`: data-fetching functionality
* `Haxl.Core.Run`: the scheduler, and `runHaxl`
* `Haxl.Core.Profile`: profiling
* `Haxl.Core.Parallel`: `pAnd` and `pOr`
* I've also moved all the memoization support into `Haxl.Core.Memo`.

This commit also fixes the build on GHC 7.8.x, 7.10.x, and 8.2.x, all the Travis builds are green again.

Closes https://github.com/facebook/Haxl/pull/79

Reviewed By: zilberstein

Differential Revision: D6030246

Pulled By: simonmar

fbshipit-source-id: 5a0dc708cf72f8ed0906f1e99000976dbfbc89e2
2017-10-27 03:37:32 -07:00
Gergely Szilvasy
1893551564 Unbreak cabal test
Summary: Some tests were failing, but we ignored the test failures by not checking the return value from the test runner. This patch fixes both the test runner and the tests.

Reviewed By: watashi

Differential Revision: D3379609

fbshipit-source-id: 0a1278879faa5beb0f9779ddfaa622cdbf05a73f
2016-06-04 15:31:43 -07:00
Gergely Szilvasy
19b024634b resolve test runner conflict
Summary: We use a FB-specific test runner in fbcode. As a result currently tests/Main.hs is different on github to allow 'cabal test' to pass. This diff resolves the difference by creating a common list of tests and two separate entry points for running the tests: tests/Main.hs for internal use, and tests/TestMain.hs for github. tests/Main.hs will (eventually) be excluded from the public sources.

Reviewed By: simonmar

Differential Revision: D3371609

fbshipit-source-id: 46a7382df814687230db43136acd496d0c5ebca9
2016-06-02 06:44:43 -07:00