summaryrefslogtreecommitdiff
path: root/src/compiler/GF/CompileInParallel.hs
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2014-10-16 14:03:57 +0000
committerhallgren <hallgren@chalmers.se>2014-10-16 14:03:57 +0000
commitc924491289259fa8a5a259ed97f2d9e817e3338c (patch)
tree178f045daa6520ca0979d093167727511c06541e /src/compiler/GF/CompileInParallel.hs
parentc0ebbc4edfeaf16a6a5f4392ea097ea3d72a0e06 (diff)
More haddock documentation improvements
Diffstat (limited to 'src/compiler/GF/CompileInParallel.hs')
-rw-r--r--src/compiler/GF/CompileInParallel.hs12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/compiler/GF/CompileInParallel.hs b/src/compiler/GF/CompileInParallel.hs
index 702602f4a..e9047b4e7 100644
--- a/src/compiler/GF/CompileInParallel.hs
+++ b/src/compiler/GF/CompileInParallel.hs
@@ -1,5 +1,5 @@
-- | Parallel grammar compilation
-module GF.CompileInParallel(batchCompile) where
+module GF.CompileInParallel(parallelBatchCompile) where
import Prelude hiding (catch)
import Control.Monad(join,ap,when,unless)
import Control.Applicative
@@ -19,8 +19,14 @@ import GF.Infra.Ident(identS)
import GF.Text.Pretty
import qualified Data.ByteString.Lazy as BS
--- | Compile the given grammar files and everything they depend on
-batchCompile jobs opts rootfiles0 =
+-- | Compile the given grammar files and everything they depend on.
+-- This function compiles modules in parallel.
+-- It keeps modules compiled in /present/ and /alltenses/ mode apart,
+-- storing the @.gfo@ files in separate subdirectories to avoid creating
+-- the broken PGF files that can result from mixing different modes in the
+-- same concrete syntax.
+
+parallelBatchCompile jobs opts rootfiles0 =
do rootfiles <- mapM canonical rootfiles0
lib_dir <- canonical =<< getLibraryDirectory opts
filepaths <- mapM (getPathFromFile lib_dir opts) rootfiles