summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Grammar/Lookup.hs
AgeCommit message (Collapse)Author
2021-07-07Replace tabs for whitespace in source codeJohn J. Camilleri
2019-09-20more dead codekrangelov
2019-09-20remove obsolete codekrangelov
2017-03-06added overload resolution in the experimental type checkerkrasimir
2014-10-21ModuleName and Ident are now distinct typeshallgren
This makes the documentation clearer, and can potentially catch more programming mistakes.
2014-10-20Remove some dead codehallgren
* The following modules are no longer used and have been removed completely: GF.Compile.Compute.ConcreteLazy GF.Compile.Compute.ConcreteStrict GF.Compile.Refresh * The STM monad has been commented out. It was only used in GF.Compile.SubExpOpt, where could be replaced with a plain State monad, since no error handling was needed. One of the functions was hardwired to the Err monad, but did in fact not use error handling, so it was turned into a pure function. * The function errVal has been renamed to fromErr (since it is analogous to fromMaybe). * Replaced 'fail' with 'raise' and 'return ()' with 'done' in a few places. * Some additional old code that was already commented out has been removed.
2014-07-27Introducing GF.Text.Pretty for more concise pretty printers and ↵hallgren
GF.Infra.Location for modularity GF.Text.Pretty provides the class Pretty and overloaded versions of the pretty printing combinators in Text.PrettyPrint, allowing pretty printable values to be used directly instead of first having to convert them to Doc with functions like text, int, char and ppIdent. Some modules have been converted to use GF.Text.Pretty, but not all. Precedences could be added to simplify the pretty printers for terms and patterns. GF.Infra.Location contains the types Location and L, factored out from GF.Grammar.Grammar, and the class HasSourcePath. This allowed the import of GF.Grammar.Grammar to be removed from GF.Infra.CheckM, making it more like a pure library module.
2013-11-20Reduced clutter in monadic codehallgren
+ Eliminated vairous ad-hoc coersion functions between specific monads (IO, Err, IOE, Check) in favor of more general lifting functions (liftIO, liftErr). + Generalized many basic monadic operations from specific monads to arbitrary monads in the appropriate class (MonadIO and/or ErrorMonad), thereby completely eliminating the need for lifting functions in lots of places. This can be considered a small step forward towards a cleaner compiler API and more malleable compiler code in general.
2013-11-05Eliminate mutual dependencies between the GF compiler and the PGF libraryhallgren
+ References to modules under src/compiler have been eliminated from the PGF library (under src/runtime/haskell). Only two functions had to be moved (from GF.Data.Utilities to PGF.Utilities) to make this possible, other apparent dependencies turned out to be vacuous. + In gf.cabal, the GF executable no longer directly depends on the PGF library source directory, but only on the exposed library modules. This means that there is less duplication in gf.cabal and that the 30 modules in the PGF library will no longer be compiled twice while building GF. To make this possible, additional PGF library modules have been exposed, even though they should probably be considered for internal use only. They could be collected in a PGF.Internal module, or marked as "unstable", to make this explicit. + Also, by using the -fwarn-unused-imports flag, ~220 redundant imports were found and removed, reducing the total number of imports by ~15%.
2013-10-30added the linref construction in GF. The PGF version number is now bumpedkr.angelov
2013-09-23GF.Grammar.Grammar.allExtends now returns a list of source modules instead ↵kr.angelov
of just the module names. This saves extra lookups later
2012-12-19GF.Grammar.Lookup: new function lookupResDefLochallgren
It's like lookupResDef but it includes a source location in the output.
2012-09-28GF shell, show_operations: nicer looking types for linearization functionshallgren
Adding a lock field to the result type of linearization functions. TODO: figure out how to add a lock field to the argument types too.
2012-09-27GF shell, show_operations: also show the types of linearization functionshallgren
This is a simple change in GF.Grammar.Lookup.allOpers, which is used only in the implementation of the show_operations command in the shell. This is useful when importing a concrete syntax (like LexiconEng) as a resource. However, the types don't always look as nice as I hoped...
2012-08-29Use nub' instead of nub in some places, remove some unused nub importspeter.ljunglof
2011-11-10Now PMCFG is compiled per module and at the end we only link it. The new ↵kr.angelov
compilation schema is few times faster.
2011-11-02merge GF.Infra.Modules and GF.Grammar.Grammar. This is a preparation for the ↵kr.angelov
separate PGF building
2011-11-02Now the compiler maintains more precise information for the source locations ↵kr.angelov
of the different definitions. There is a --tags option which generates a list of all identifiers with their source locations.
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-02-28the command show_operations to inspect opers in scopeaarne
2010-11-12operations in the abstract syntaxkrasimir
2010-07-01redesign the open-literals APIkrasimir
2010-06-17rename GF.Grammar.Predef.isPredefCat to isLiteralCatkrasimir
2010-06-17GF.Grammar.Lookup.allParamValues now works for table types as wellkrasimir
2010-05-28refactoring in GF.Grammar.Grammarkrasimir
2010-03-22store and propagate the exact source location for all judgements in the ↵krasimir
grammar. It may not be used accurately in the error messages yet
2010-02-16no need to keep the list of constructors per category in .gfokrasimir
2010-01-31refactor GF.Infra.Modules for better error messageskrasimir
2009-12-13reorganize the directories under src, and rescue the JavaScript interpreter ↵krasimir
from deprecated