Reimplemented it with the new function accumulateError.
Also keeping the formatting of errors and warnings unchanged for now, to avoid
potentially causing problems in the GF Eclipse Plugin.
Using accumulated errors in the Check monad.
TODO: some errors are still not accumulated, but thanks to checkMapRecover
at least one error per judgement is reported.
In addition to warnings, the Check monad in GF.Infra.CheckM can now accumulate
errors. There are two new functions
checkAccumError: Message -> Check ()
accumulateError :: (a -> Check a) -> a -> Check a
The former (with the same type as checkWarn) is used to report an accumulated
(nonfatal) error. The latter converts fatal errors into accumulated errors.
Accumulated errors are reported as regular errors by runCheck.
Also, the Check monad type has been made abstract.
This turns error messages like
gf: too few bytes. Failed reading at byte position 1
gf: /some/path/somefile.gfo: too few bytes. Failed reading at byte position 1
but a better fix would be to ignore bad .gfo files and compile from source.
The problem is the way this decision is made in
GF.Compile.ReadFiles.selectFormat...
Also added feedback to source & target language menus to indicate which
languages are supported by the selected translation method. For Apertium, the
source language menu shows all possible source languages, and the target menu
shows the possible target languages for the chosen source language.
The Setup.hs script now queries darcs to create more detailed version info
to include in the startup message.
Note thought that with distributed version control systems like darcs,
the only way to uniquely identify a version is by the set of patches included.
Since the patches are not totally ordered, just looking at the last patch is
not enough.
For official releases, we tag the current set of patches so we can refer to
it by name (e.g. RELEASE-3.3.3).
Note though that the unlexer does the wrong thing with initial words that are
supposed to be capitalized, e.g. "I am ready.", "Spanish wine is good.", so
these sentenses are not translated at the moment.