All changes have been reflected in the gf-contrib repository:
https://github.com/GrammaticalFramework/gf-contrib
Now, for WebSetup to build the example grammars, one must have gf-contrib
cloned in the same top-level directory as GF. When this isn't the case,
WebSetup displays a notice without failing.
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.
This should work nicely now that GF itself can detect the number of processors
in the system.
Previously there was some code in WebSetup.hs that relied on Cabal to do this,
but it was commented out because it requires Cabal>=1.20, which is fairly new
and it would complicate the installation instructions if it was required to
compile GF...
The minibar lets the user choose any category as the start category, but this
can lead to run-time errors for grammars compiled with -optimize-pgf.
The problem can also be observed in the GF shell. For example,
"linearize Fish" (which means that the start category is Kind) fails for
some languages when Foods.pgf is compiled with -optimize-pgf.
On my laptop these changes speed up the full build of the RGL and example
grammars with 'cabal build' from ~95s to ~43s and the zero build from ~18s
to ~5s.
The main change is the introduction of the module GF.CompileInParallel that
replaces GF.Compile and the function GF.Compile.ReadFiles.getAllFiles. At
present, it is activated with the new -j flag, and it is only used when
combined with --make or --batch. In addition, to get parallel computations,
you need to add GHC run-time flags, e.g., +RTS -N -A20M -RTS, to the command
line.
The Setup.hs script has been modified to pass the appropriate flags to GF
for parallel compilation when compiling the RGL and example grammars, but you
need a recent version of Cabal for this to work (probably >=1.20).
Some additonal refactoring were made during this work. A new monad is used to
avoid warnings/error messages from different modules to be intertwined when
compiling in parallel, so some functios that were hardiwred to the IO or IOE
monads have been lifted to work in arbitrary monads that are instances in
the appropriate classes.
The directory should be the same as the one used in Setup.hs when building
the RGL, where a build directory supplied by cabal is used. This is usually
dist/build/rgl, but it could be different, e.g. when using a cabal sandbox.
+ Changing version numbers and dates here and there.
+ Simplify build-binary-dist.sh since pgf-http need not be built anymore.
+ Use--gf-lib-path to make the sample grammars for minibar compile even if GF
is not installed.
Use the command "dist/build/gf/gf" instead of "gf" to compile the sample
grammars for the minibar, to avoid failing if gf is installed in a directory
which is not in the $PATH.
"gf -server" mode now contains everything needed to run the minibar and
the grammar editor (including example-based grammar writing).
The Setup.hs script installs the required files where gf -server can find them.
These files have been moved to a new directory: src/www.
The separate server program pgf-http is now obsolete.