summaryrefslogtreecommitdiff
path: root/src/compiler/GF/System/Concurrency.hs
AgeCommit message (Collapse)Author
2017-08-18Bump version requirements to base>=4.6, Cabal>=1.20Thomas Hallgren
Cabal>=1.20 allows control over parallelism when compiling grammars from Setup.hs and WebSetup.hs. base>=4.6 allows conditional compilation with CPP to be eliminated from a few modules. base-4.6 corresponds to GHC 7.6.3, which is what you get in Debian 8 (aka jessie, aka oldstable) from 2015.
2015-09-11Remove debug output introduced in previous patchhallgren
Oops.
2015-09-11Parallel compilation: "gf -make -j" and "gf -make -j=n" now work as expectedhallgren
* "gf -make -j=n" uses n parallel threads. * "gf -make -j" adapts to the number of processors in the system. This mimics how "cabal build -j" and "ghc --make -j" works. Support for this is implemented in the new module GF.System.Concurrency and it depends on the function Control.Concurrent.setNumCapabilities, which is only available in GHC>=7.6 (base>=4.6). GF can still be compiled with GHC<7.6, but then you have to use +RTS -N -RTS to take advantage of multicore processors. To detect the number of processors in the system, the code depends on a foreign import of a C function in the GHC run-time system.