<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gf-core.git/src/compiler/GF/Grammar/PatternMatch.hs, branch optimize</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.adelon.net/gf-core.git/atom?h=optimize</id>
<link rel='self' href='https://git.adelon.net/gf-core.git/atom?h=optimize'/>
<link rel='alternate' type='text/html' href='https://git.adelon.net/gf-core.git/'/>
<updated>2021-07-07T07:40:41+00:00</updated>
<entry>
<title>Replace tabs for whitespace in source code</title>
<updated>2021-07-07T07:40:41+00:00</updated>
<author>
<name>John J. Camilleri</name>
<email>john@digitalgrammars.com</email>
</author>
<published>2021-07-07T07:40:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.adelon.net/gf-core.git/commit/?id=f2e52d6f2c2bc90febceebdea0268b40ea37476c'/>
<id>urn:sha1:f2e52d6f2c2bc90febceebdea0268b40ea37476c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>another bug related to mattern matching on multiword expression</title>
<updated>2020-02-18T14:07:47+00:00</updated>
<author>
<name>krangelov</name>
<email>kr.angelov@gmail.com</email>
</author>
<published>2020-02-18T14:07:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.adelon.net/gf-core.git/commit/?id=31339001252a63c0f86ade423cb03095f21c5862'/>
<id>urn:sha1:31339001252a63c0f86ade423cb03095f21c5862</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix: pattern matching on strings should reconstruct the tokens after matching</title>
<updated>2020-02-17T18:29:36+00:00</updated>
<author>
<name>krangelov</name>
<email>kr.angelov@gmail.com</email>
</author>
<published>2020-02-17T18:29:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.adelon.net/gf-core.git/commit/?id=e15392e5794b8d31ad80b86bf8cc902ebba795d3'/>
<id>urn:sha1:e15392e5794b8d31ad80b86bf8cc902ebba795d3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Comment out some dead code found with -fwarn-unused-binds</title>
<updated>2015-08-28T13:59:43+00:00</updated>
<author>
<name>hallgren</name>
<email>hallgren@chalmers.se</email>
</author>
<published>2015-08-28T13:59:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.adelon.net/gf-core.git/commit/?id=5bfaf10de597af504e6d2784309e533b09a6451c'/>
<id>urn:sha1:5bfaf10de597af504e6d2784309e533b09a6451c</id>
<content type='text'>
Also fixed some warnings and tightened some imports
</content>
</entry>
<entry>
<title>Introducing GF.Text.Pretty for more concise pretty printers and GF.Infra.Location for modularity</title>
<updated>2014-07-27T22:06:23+00:00</updated>
<author>
<name>hallgren</name>
<email>hallgren@chalmers.se</email>
</author>
<published>2014-07-27T22:06:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.adelon.net/gf-core.git/commit/?id=30cda5151651e712803527b6ab4e5abc07536f2c'/>
<id>urn:sha1:30cda5151651e712803527b6ab4e5abc07536f2c</id>
<content type='text'>
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.

</content>
</entry>
<entry>
<title>Reduced clutter in monadic code</title>
<updated>2013-11-20T00:45:33+00:00</updated>
<author>
<name>hallgren</name>
<email>hallgren@chalmers.se</email>
</author>
<published>2013-11-20T00:45:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.adelon.net/gf-core.git/commit/?id=018c9838ed31571b699118ae75b1d62d5527fd77'/>
<id>urn:sha1:018c9838ed31571b699118ae75b1d62d5527fd77</id>
<content type='text'>
+ 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.
</content>
</entry>
<entry>
<title>Eliminate mutual dependencies between the GF compiler and the PGF library</title>
<updated>2013-11-05T13:11:10+00:00</updated>
<author>
<name>hallgren</name>
<email>hallgren@chalmers.se</email>
</author>
<published>2013-11-05T13:11:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.adelon.net/gf-core.git/commit/?id=3814841d7d3b77b3f033cb98c1c0a04ac39435d7'/>
<id>urn:sha1:3814841d7d3b77b3f033cb98c1c0a04ac39435d7</id>
<content type='text'>
+ 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%.

</content>
</entry>
<entry>
<title>Fix an old bug that prevented pattern matching agains values containg tables</title>
<updated>2013-09-05T15:20:41+00:00</updated>
<author>
<name>hallgren</name>
<email>hallgren@chalmers.se</email>
</author>
<published>2013-09-05T15:20:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.adelon.net/gf-core.git/commit/?id=d7916c1b085826fc6be73527dde70db00941e909'/>
<id>urn:sha1:d7916c1b085826fc6be73527dde70db00941e909</id>
<content type='text'>
The function GF.Grammar.PatternMatch.isInConstantForm returned False for all
tables, causing matchPattern to fail, claiming that "variables occur in" the
term if it contains tables.

This problem is several years old, confirmed present in GF 3.2.10 (Oct 2010).
</content>
</entry>
<entry>
<title>pattern match length estimation code simplication</title>
<updated>2013-02-28T15:13:20+00:00</updated>
<author>
<name>hallgren</name>
<email>hallgren@chalmers.se</email>
</author>
<published>2013-02-28T15:13:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.adelon.net/gf-core.git/commit/?id=95d77e3c37fa97f770d845dd0d05890455f8119e'/>
<id>urn:sha1:95d77e3c37fa97f770d845dd0d05890455f8119e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Faster regular expression pattern matching in the grammar compiler.</title>
<updated>2013-02-27T20:59:43+00:00</updated>
<author>
<name>hallgren</name>
<email>hallgren@chalmers.se</email>
</author>
<published>2013-02-27T20:59:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.adelon.net/gf-core.git/commit/?id=0feb386691bb82e13c3dcc01e27ae33d8865f2ca'/>
<id>urn:sha1:0feb386691bb82e13c3dcc01e27ae33d8865f2ca</id>
<content type='text'>
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.
</content>
</entry>
</feed>
