summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile/Rename.hs
AgeCommit message (Collapse)Author
2021-07-07Replace tabs for whitespace in source codeJohn J. Camilleri
2021-07-02Merge pull request #57 from inariksit/cc-bugfix-rgl-onlyInari Listenmaa
Hotfix for #56 (cc doesn't work for many RGL languages)
2020-06-06Hotfix for https://github.com/GrammaticalFramework/gf-core/issues/56Inari Listenmaa
2020-06-04Add clarification to "Pattern is not linear" error msg.Inari Listenmaa
2019-09-20remove obsolete codekrangelov
2014-10-21ModuleName and Ident are now distinct typeshallgren
This makes the documentation clearer, and can potentially catch more programming mistakes.
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.
2014-02-09disabled ad hoc overloading, as it still causes mysterious errors. It is ↵aarne
just a few lines in Rename.hs
2014-02-01ad hoc overloading: a new way to deal with name resolution conflicts. ↵aarne
Previously the renamer warned if there was e.g. an unqualified reference to mkAdv, which could come from either Syntax or Paradigms. The renamer picked randomly one of the alternatives, which then often failed in type checking. Now, all candidates are collected into a new structure AdHocOverload [Term], which is accessed by the type checker to make the choice based on the type of the constant. This eliminates some of the warnings and some of the error due to wrong choices. In some rare cases, the inherited constants have the same type, which cannot be resolved by overloading. In such cases, the type checker does the same as the renamer did before: pick the "first" option (i.e. the one that happens to be the first in the list returned by the renamer) and issues a warning. In this patch, only a couple of lines are changed. The typechecker (RConcrete) has more substantial changes, and will be recorded as the next patch.
2013-12-06Show relative file paths in error messageshallgren
This is to avoid one trivial reason for failures in the test suite.
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
2013-09-09Nonlinear patterns in concrete syntax are now detected and reported as errorshallgren
Before, they were silently converted to linear patterns. Nonlinear patterns in MorphoCat.gf, ParadigmsGre.gf and ParadigmsFin.gf have been make linear by renaming pattern variables.
2012-10-19Consistenly use SourceGrammar instead of [SourceModule] when calling ↵hallgren
compiler passes
2012-06-25GF.Compile.Rename: report many errors instead of stopping after the first onehallgren
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.
2012-06-25checkMapRecover: find undefined idents in all jments in Renameaarne
2011-11-15more structured format for errors and warnings from the compilerkr.angelov
2011-11-14the new design for -tagskr.angelov
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-10-25qualification with real module name accepted, as in GF refmanaarne
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: 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-07-21GenIP, GenRP in Extra and any_Quant in ExtraEngaarne
2010-11-12operations in the abstract syntaxkrasimir
2010-07-01redesign the open-literals APIkrasimir
2010-06-17rename GF.Grammar.Predef.isPredefCat to isLiteralCatkrasimir
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