summaryrefslogtreecommitdiff
path: root/src/compiler
AgeCommit message (Collapse)Author
2011-09-15Add a command name header to the 'help -t2t' outputhallgren
2011-09-15made ps -from_TRANSLIT symmetric to -to_TRANSLIT in the sense that unknown ↵aarne
characters are returned as themselves and not as question marks
2011-09-14Omit empty sections in gf help outputhallgren
2011-09-14GF shell command 'help -t2t' outputs help in txt2tags formathallgren
2011-09-09Don't make noexpand the default with -fcclazyhallgren
This reverts the previous change. Not preprocessing opers turns out to make a difference in what needs to be mentioned in restricted inheritance/imports.
2011-09-09Make noexpand the default optimization package when configuring with -fcclazyhallgren
2011-09-09Remove unused function computeConcreteRec.hallgren
This also allows the parameter rec to be removed from function computeTermOpt. (The change is made in GF.Compile.Compute.ConcreteLazy, but not in GF.Compile.Compute.ConcreteStrict.)
2011-09-07GF.Grammar.Macros: simplify composOp and composSafeOphallgren
2011-09-05Make the -fcclazy configuration option visible in the build info in the GF ↵hallgren
Shell welcome message
2011-09-01Add lazy version of GF.Compile.Compute.Concretehallgren
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.
2011-09-01GF.Grammar.*: generalized the type of some functions that can not fail from ↵hallgren
the Err monad to arbitrary monads
2011-08-31GF.Compile.Coding: cleaner code hallgren
Refine function codeTerm into codeTerm, codeLTerm and codeLTerms.
2011-08-31GF.Infra.Modules: minor tweakshallgren
Still keeping the modules both in a list and in a finite map. The overhead is smaller than I initially thought.
2011-08-30GF.Infra.Modules: restore module dependency order invarianthallgren
It is needed by greatestResource (and similar functions, presumably). So keep both the list and the finite map of modules. This slows down some things, but the compilation of PhrasebookFin.pgf benefits from it. To be continued...
2011-08-30GF.Infra.Modules: keep the modules of a grammar in a finite map instead of a ↵hallgren
list This speeds up the compilation of PhrasebookFin.pgf by 12%, mosly by speeding up calls to lookupModule in calls from lookupParamValues, in calls from allParamValues. The invariant "modules are stored in dependency order" is no longer respected! But the type MGrammar is now abstract, making it easier to maintain this or other invariants in the future.
2011-08-30GF.Grammar.Lookup: added function lookupQIdentInfohallgren
+ Avoids some code duplication by combinging lookupModule and lookupIdentInfo. + Also removed lookupIdentInfo from export list, since it is not used anywhere else.
2011-08-30PatternMatch.hs: commented out suspicious unused function varsOfPatthallgren
2011-08-30GrammarToPGF.hs: comment out unused importshallgren
2011-08-28import command now gives priority to new abstract syntax, and discards the ↵aarne
old concretes if they are for the old abstract; the new priority is implemented in PGF.Data.unionPGF
2011-08-25reload command in shellaarne
2011-08-22commented Compute/Concrete with explanationsaarne
2011-07-21GenIP, GenRP in Extra and any_Quant in ExtraEngaarne
2011-06-20refinementNepali-11-06-20virk.shafqat
2011-06-14allow empty lines in transliteration filesaarne
2011-06-02Predef functions toUpper, toLower, isUpperaarne
2011-05-19refinementsTextUrd-11-05-19virk.shafqat
2011-05-06fixed problems in persian transliteration pointed out by Elnazaarne
2011-05-02transliteration via configuration file: ps -to=file or ps -from=fileaarne
2011-04-20Ctrl-C shouldn't terminate the GF shellhallgren
This quick fix should make Ctrl-C in the GF shell behave more like it does in other shells: even if no command is running, Ctrl-C now just gives you a new prompt instead of terminating the shell.
2011-04-15GFI.hs: some refactoring for readabilityhallgren
Also some minor changes in how Ctrl-C is handled and how CPU time is measured.
2011-04-13Added a preliminary "gf -server" mode.hallgren
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.
2011-04-13Show configuration options as part of build infohallgren
The GF shell welcome message will now include something like This is GF version 3.2.1-darcs. Built on darwin/i386 with ghc-7.0, flags: interrupt where a list of enabled configuration flags are included on the last line. This is implemented in GF.Infra.BuildInfo by consulting the CPP macros defined by the respective option in gf.cabal. For this to work, GF.Infra.BuildInfo obviously has to be updated when new flags are added to gf.cabal or if the CPP macros are renamed. (Also, I suspect that if you reconfigure with different flags and rebuild GF without cleaning first, the BuildInfo module will not be recompiled, resulting in a misleading welcome message...)
2011-04-13GF.Infra.UseIO: add functions readBinaryFile & writeBinaryFilehallgren
2011-04-08GF shell restricted mode: found one more writeFile that should be restrictedhallgren
2011-04-06avoid warning from ghc-7.0hallgren
Warning: -fglasgow-exts is deprecated: Use individual extensions instead
2011-04-06generate Eq instance for GADTaarne
2011-04-06fixed the printing of predefined and list categories in haskell=gadtaarne
2011-04-04GFI.hs: refactoring to add a function for executing a single GF shell command.hallgren
The intention is to use the new function to implement a web service API to the GF shell.
2011-04-04Add build info to the GF shell welcome messagehallgren
2011-02-10Adding a basic lexicon-based tokenizer and the asociated command in gf shellgdetrez
2010-12-11Adding an option to the gf compiler to add an index to pgf filesgdetrez
This is gonna be used by the android library to skip unused part of a pgf file
2011-03-12make it possible to override opers defined in an interface by syntax ↵aarne
'instance Foo of Bar - [f,g,h]'
2011-03-12make later flags take priority over earlier ones in PGF generation aarne
2011-03-12generalized pt -transfer so that it goes into subtrees (naive implementation ↵aarne
in TreeOperations; using PGF.Expr.match would be better); example given in 'h pt'
2011-03-05added composOp generation to haskell-gadt, and an example in ↵aarne
examples/gadt-transfer
2011-03-04switched the upper and lower parts of lexc entries to their standard orderaarne
2011-03-04revived GADT generationaarne
2011-03-04fixed a variable refreshing bug in the compileraarne
2011-03-03GF shell restricted modehallgren
By setting the environment variable GF_RESTRICTED before starting GF, the shell will be run in restricted mode. This will prevent the GF shell from starting arbitrary system commands (most uses of System.Cmd.system are blocked) and writing arbitrary files (most commands that use writeFile et al are blocked). Restricted mode is intended minimize the potential security risks involved in allowing public access to the GF shell over the internet. It should be used in conjuction with system level protection mechanisms (e.g. file permissions) to make sure that a publicly acessible GF shell does not give access to parts of the system that should not be publicly accessible.
2011-03-03overloaded opers included in sorting of judgementsaarne