As a temporary workaround, alex is no longer invoked automatically when
building with cabal. Developers who want to modify the lexer need to run
alex on Lexer.x manually and record the modified Lexer.hs.
src/compiler/GF/Grammar/lexer/Lexer.x -- hidden from cabal
src/compiler/GF/Grammar/Lexer.hs -- update it manually
Removing "ghc-options: -O2" from gf.cabal has the following advantages:
+ Compiling GF is faster (time drops from 182s to 142s on my laptop)
+ Compiling the RGL is faster (time drops from 159s to 155s on my laptop)
+ Without the hardwired optimization level, the 'cabal configure' options
--enable-optimization=<n> and --disable-optimization work as expected
(so if you still want -O2, use --enable-optimization=2)
+ GF can be compiled with ghc-7.2.2 and ghc-7.4.1 (-O2 triggers a bug in
these versions of ghc, it seems. Another workaround, discovered by
Sergei Trofimovich, is to use -O0 in Data.Binary.)
Also moved the translation quiz from demos/TransQuiz to src/www/TransQuiz so
that it will be installed by 'cabal install' along with the other files that
are installed for use by gf -server mode.
+ 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.
"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.
"gf -server" mode now includes PGF service and the services to support
example-based grammar writing. (But gf -server is not quite ready to replace
pgf-http yet...)
Also bumped GF version number to 3.2.10-darcs
This patch adds GF.Compile.Compute.ConcreteLazy, which replaces the Err monad
with the Identity monad. While the Err monad makes the interpreter
(hyper)strict, the Identity monad let's the interpreter inherit Haskell's
laziness. This can give big speedups: from 50s to 1s in one example,
from ~4 minutes to ~2 minutes for the RGL.
This is still experimental and might be buggy, so it is off by default.
You can turn it on by configuring with the -fcclazy flag, e.g.
cabal configure -fcclazy
Let me know if anything breaks.
This is just to make it easier to tell who has the latest version at the
summer school. There has been some bug fixes in gf itself and some significant
additions to the RGL since 3.2 was released.
Also explicitly require Alex 2.x. The recently released Alex 3.0 has backwards
incompatible changes and does not work. GF/Grammar/Lexer.x should probably
be modified to support both Alex 2.x and Alex 3.0...
The command "gf -server" now starts a simple HTTP server on port 41295,
providing a simple web API to the GF compiler. It currently support the
follwing operations:
* creating new temporary directories for grammar uploads,
* uploading grammars files for use in the GF shell,
* executing GF shell commands, and
* accessing static files.
This means that GF now depends on some additional networking related packages,
but they should be available and easy to install on all platforms. There is
also a new configuration flag "server" in gf.cabal, so GF will be compiled
without support for server mode if the extra packages are unavailable.
Note that running gf -server while connected to the internet can be a security
risk. To prevent unauthorized access to the rest of the system, it is
advisable to run the server in GF_RESTRICTED mode and as a user with suitably
restricted file permissions.
I changed the version number to 3.2.1-darcs.
I think the version number of the current version from darcs should always
include the "-darcs" suffix (or "-current" perhaps?). The suffix should be
removed only momentarily when making an official release.
The version of cabal distributed with Ubuntu 10.10 is too old to handle
executables that refer to the library in the same package, so to not make it
too complicated for Ubuntu users to compile GF from source, pgf-http is no
longer part of the main gf.cabal. :-(
The default binary representation in haskell's Data.Binary package is
homemade and quite complicated. Making it compliant with IEEE 754 will
make it easyer for the java runtimes (and probably others) to load the
PGF.