| Age | Commit message (Collapse) | Author |
|
|
|
|
|
Also in Commands.hs: be explicit about things imported from the PGF library
that are not in the public API.
Also a couple of haddock documentation fixes.
|
|
|
|
When compiling a grammar containing characters that are not supported in the
current locale, warning messages could cause GF fail with
hPutChar: invalid argument (Invalid or incomplete multibyte or wide character)
With this quick fix, warning messages that can not be displayed are silently
truncated instead, and compilation continues.
|
|
|
|
The old partial evaluator has special rules to convert pattern macros in
pre { } expressions. These rules were missing in the new partial evaluator.
|
|
|
|
This should prevent errors like
Internal error in Compute.ConcreteNew:
Applying Predef.drop: Expected a value of type String, got VFV [VString "gewandt",VString "gewendet"]
|
|
-subtrees <bigtree> | l -treebank for debugging the lin of a big tree
|
|
|
|
Get rid of old-time depend (and ClockTime in favour of UTCTime).
time-compat helps to retain backward compatibility with directory-1.1
and lower.
|
|
In Data.Operations, the function topoTest2 assumed too much about the form of
the input, compared to the older function topoTest.
|
|
|
|
The sequence operator (x+y) was implemented by splitting the string to be
matched at all positions and trying to match the parts against the two
subpatterns. To reduce the number of splits, we now estimate the minimum and
maximum length of the string that the subpatterns could match. For common
cases, where one of the subpatterns is a string of known length, like
in (x+"y") or (x + ("a"|"o"|"u"|"e")+"y"), only one split will be tried.
|
|
Allow line breaks in more places to make large terms more readable.
|
|
flag beam_size in the top-level concrete module
|
|
lexicon, as required by Xerox lexc
|
|
Instead of "Internal error in ...", you now get a proper error message with
a source location and a function name.
|
|
Add a conversion rule for ({ l1 = e } ** x).l2 in PMCFG generation. (A rule
for the symmetric case (x ** { l1 = e }).l2 was added some time ago.)
|
|
files correctly.
The parser works on raw byte sequences read from source files. If parsing
succeeds the raw byte sequences are converted to proper Unicode characters
in a later phase. But the parser calls the function buildAnyTree, which can
fail and generate error messages containing source code fragments, which might
then containing raw byte sequences. To render these error messages correctly,
they need to be converted in accordance with the coding flag in the source
file. This is now done for UTF-8-encoded source files, but should ideally also
be done for other character encodings. (Latin-1-encoded files never suffered
from this problem, since raw bytes are proper Unicode characters in this case.)
|
|
+ Instead of "Internal error in ...", you now get a proper error message with
a source location and a function name.
+ Also added some missing error value propagation in the partial evaluator.
+ Also some other minor cleanup and error handling fixes.
|
|
same as one of the expected ones: it shows full records rather than just lock fields.
|
|
"a"+("b"++"c") was simplified to "bb"++"c" instead of "ab"++c.
|
|
It can leave wildcard tables in their origial form, but it easy to handle
them in the unfactor function in GeneratePMCFG.
|
|
|
|
It failed to delay table selection when the selector contains a run-time
variable, causing "gf: Prelude.(!!): index too large" instead.
Also:
+ Show better source locations on unexpected errors, to aid bug hunting.
+ Removed unused SourceGrammar argument to value2term.
|
|
It's like lookupResDef but it includes a source location in the output.
|
|
Int was missing from the list of predefined canonical constants.
|
|
are always listed in decreasing probability order. There is also an API for generation from Python
|
|
FlexibleInstances does not imply TypeSynonymInstances, apparently.
|
|
The work done by the partial evaluator is now divied in two stages:
- A static "term traversal" stage that happens only once per term and uses
only statically known information. In particular, the values of lambda bound
variables are unknown during this stage. Some tables are transformed to
reduce the cost of pattern matching.
- A dynamic "function application" stage, where function bodies can be
evaluated repeatedly with different arguments, without the term traversal
overhead and without recomputing statically known information.
Also the treatment of predefined functions has been reworked to take advantage
of the staging and better handle partial applications.
|
|
* Evaluate operators once, not every time they are looked up
* Remember the list of parameter values instead of recomputing it from the
pattern type every time a table selection is made.
* Quick fix for partial application of some predefined functions.
|
|
Also adding a test case in the test suite for this.
|
|
More changes are probably needed to make pattern macros first class values.
Also includes minor changes related to variants and error messages.
|
|
GrammarToPGF, to help find compilation errors; the ones I've found are because an inherited abstract excludes something that the inherited concrete does not exclude.
|
|
The pretty printer produced
mkDet pre {"a"; "an" / vowel} Sg
which is not accepted by the parser. The parser assigns pre { ... }, to
prededence level 4, and this is now reflected in the pretty printer, so
it prints
mkDet (pre {"a"; "an" / vowel}) Sg
(This caused a problem in GFSE since it parsers pretty printed grammars...)
|
|
|
|
With this change, all languages in molto/mgl/mixture except German and Polish
can be compiled.
|
|
This can make it easier to test cloud service updates before installing them.
|
|
Change the command name from gfc to gf in the usage message header.
Correct spelling of "overide" to "override" in -gf-lib-path description.
|
|
GF.Compile.Compute.ConcreteNew + two new modules contain a new
partial evaluator intended to solve some performance problems with the old
partial evalutator in GF.Compile.Compute.ConcreteLazy. It has been around for
a while, but is now complete enough to compile the RGL and the Phrasebook.
The old partial evaluator is still used by default. The new one can be activated
in two ways:
- by using the command line option -new-comp when invoking GF.
- by using cabal configure -fnew-comp to make -new-comp the default. In this
case you can also use the command line option -old-comp to revert to the old
partial evaluator.
In the GF shell, the cc command uses the old evaluator regardless of -new-comp
for now, but you can use "cc -new ..." to invoke the new evaluator.
With -new-comp, computations happen in GF.Compile.GeneratePMCFG instead of
GF.Compile.Optimize. This is implemented by testing the flag optNewComp in
both modules, to omit calls to the old partial evaluator from GF.Compile.Optimize
and add calls to the new partial evaluator in GF.Compile.GeneratePMCFG.
This also means that -new-comp effectively implies -noexpand.
In GF.Compile.CheckGrammar, there is a check that restricted inheritance is used
correctly. However, when -noexpand is used, this check causes unexpected errors,
so it has been converted to generate warnings, for now.
-new-comp no longer enables the new type checker in
GF.Compile.Typeckeck.ConcreteNew.
The GF version number has been bumped to 3.3.10-darcs
|
|
This is also needed for compatibility with GHC 7.6.
|
|
|
|
GF.Data.Utilities: Rename mapFst to apFst, mapSnd to apSnd.
Add apBoth, mapFst, mapSnd, mapBoth.
GF.Data.Operations: Remove onSnd (same as apSnd)
|
|
|
|
collectPattOp :: (Patt -> [a]) -> Patt -> [a]
|
|
For Patt, analogous to composOp for Term.
|
|
Also add a missing check for Predef values in apply.
|
|
Just to make them easier to spot when wading through thousands of lines of
warnings...
|