<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gf-core.git/src/compiler/GF/Compile.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>2018-07-22T07:04:07+00:00</updated>
<entry>
<title>GF_LIB_PATH can now be path1:path2:path3, not just path1</title>
<updated>2018-07-22T07:04:07+00:00</updated>
<author>
<name>meng wong</name>
<email>mengwong@pobox.com</email>
</author>
<published>2017-08-19T11:27:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.adelon.net/gf-core.git/commit/?id=8a14912ee3b692bc578465b6920575f5d7b11b4c'/>
<id>urn:sha1:8a14912ee3b692bc578465b6920575f5d7b11b4c</id>
<content type='text'>
Traditionally, GF_LIB_PATH points to something like
`.../share/ghc-8.0.2-x86_64/gf-3.9/lib`

and if you want prelude and alltenses and present, you add a
`--# -path=.:present`
compiler pragma to the top of your .gf file

But if you are developing some kind of application grammar
library or contrib of your own, you might find yourself
repeating your library path at the top of all your .gf files.

After painstakingly maintaining the same library path at the
top of all your .gf files, you might say, let's factor this
out into GF_LIB_PATH.

Then you might then find to your surprise that GF_LIB_PATH
doesn't accept the usual colon:separated:path notation
familiar from, say, unix PATH and MANPATH.

This patch allows you to define
`GF_LIB_PATH=gf-3.9.lib:$HOME/gf-contrib/whatever/lib`
in a more natural way.

If you are an RGL hacker and have your own version of the
RGL tree sitting somewhere, you should be able to have both
paths in the GF_LIB_PATH, for added convenience. This minor
convenience will probably lead to obscure bugs and great
frustration when you find that your changes are mysteriously
not being picked up by GF; so keep this in mind and use it
cautiously.

This caution should probably sit in the documentation
somewhere. A subsequent commit will do that.

If you use zsh, you can do this to quickly build up a big
GF_LIB_PATH:

% gf_lib_path=( $HOME/src/GF/lib/src/{api,abstract,common,english,api/libraryBrowser,prelude,..} )

% typeset -xT GF_LIB_PATH gf_lib_path
</content>
</entry>
<entry>
<title>A couple of haddock documentation improvements</title>
<updated>2014-10-28T14:58:43+00:00</updated>
<author>
<name>hallgren</name>
<email>hallgren@chalmers.se</email>
</author>
<published>2014-10-28T14:58:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.adelon.net/gf-core.git/commit/?id=f085b807ebe7fa1bb6f05e6324b3e90ef4f109e5'/>
<id>urn:sha1:f085b807ebe7fa1bb6f05e6324b3e90ef4f109e5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Various small changes for improved documentation</title>
<updated>2014-10-22T15:45:52+00:00</updated>
<author>
<name>hallgren</name>
<email>hallgren@chalmers.se</email>
</author>
<published>2014-10-22T15:45:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.adelon.net/gf-core.git/commit/?id=6ee67cd04ffbce375d7f10e74a5d9eb742d6428d'/>
<id>urn:sha1:6ee67cd04ffbce375d7f10e74a5d9eb742d6428d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ModuleName and Ident are now distinct types</title>
<updated>2014-10-21T19:20:31+00:00</updated>
<author>
<name>hallgren</name>
<email>hallgren@chalmers.se</email>
</author>
<published>2014-10-21T19:20:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.adelon.net/gf-core.git/commit/?id=391b301881bee7de9580f2c6d819144161e6a51d'/>
<id>urn:sha1:391b301881bee7de9580f2c6d819144161e6a51d</id>
<content type='text'>
This makes the documentation clearer, and can potentially catch more
programming mistakes.

</content>
</entry>
<entry>
<title>Renaming SourceGrammar to Grammar and similarly for some related types</title>
<updated>2014-10-21T14:42:31+00:00</updated>
<author>
<name>hallgren</name>
<email>hallgren@chalmers.se</email>
</author>
<published>2014-10-21T14:42:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.adelon.net/gf-core.git/commit/?id=3bfcfa157dc291e03bfb4db3baed8b0098d76f50'/>
<id>urn:sha1:3bfcfa157dc291e03bfb4db3baed8b0098d76f50</id>
<content type='text'>
Included renamings:

	SourceGrammar -&gt; Grammar
	SourceModule -&gt; Module
	SourceModInfo -&gt; ModuleInfo
	emptySourceGrammar -&gt; emptyGrammar

Also introduces a type synonym (which might be good to turn into a newtype):

	type ModuleName = Ident

The reason is to make types like the following more self documenting:

	type Module = (ModuleName,ModuleInfo)
	type QIdent = (ModuleName,Ident)
</content>
</entry>
<entry>
<title>Some small documentation improvements</title>
<updated>2014-10-20T19:45:43+00:00</updated>
<author>
<name>hallgren</name>
<email>hallgren@chalmers.se</email>
</author>
<published>2014-10-20T19:45:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.adelon.net/gf-core.git/commit/?id=a9bc1160521a0196ab8407a565b7643fe649f6f6'/>
<id>urn:sha1:a9bc1160521a0196ab8407a565b7643fe649f6f6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Some work on the haddock documentation</title>
<updated>2014-10-16T16:28:54+00:00</updated>
<author>
<name>hallgren</name>
<email>hallgren@chalmers.se</email>
</author>
<published>2014-10-16T16:28:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.adelon.net/gf-core.git/commit/?id=6375bacc73c5ba2f0dd660fab18b590506027822'/>
<id>urn:sha1:6375bacc73c5ba2f0dd660fab18b590506027822</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixes for the haddock documentation</title>
<updated>2014-10-15T20:42:36+00:00</updated>
<author>
<name>hallgren</name>
<email>hallgren@chalmers.se</email>
</author>
<published>2014-10-15T20:42:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.adelon.net/gf-core.git/commit/?id=393dde2eb93a975442697c177dbb161e4300bea0'/>
<id>urn:sha1:393dde2eb93a975442697c177dbb161e4300bea0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add lifted directory operations in GF.System.Directory to eliminate the need for liftIO in various places</title>
<updated>2014-08-20T17:47:08+00:00</updated>
<author>
<name>hallgren</name>
<email>hallgren@chalmers.se</email>
</author>
<published>2014-08-20T17:47:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.adelon.net/gf-core.git/commit/?id=21f429caf8c8cb4248457c16abaf0ad4f51c974a'/>
<id>urn:sha1:21f429caf8c8cb4248457c16abaf0ad4f51c974a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>GF.CompileOne: refactoring to reduce code duplication and improve readability</title>
<updated>2014-08-20T17:04:15+00:00</updated>
<author>
<name>hallgren</name>
<email>hallgren@chalmers.se</email>
</author>
<published>2014-08-20T17:04:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.adelon.net/gf-core.git/commit/?id=73310add9a549b58381f475eab5324a17a6b83dd'/>
<id>urn:sha1:73310add9a549b58381f475eab5324a17a6b83dd</id>
<content type='text'>
I prefer small functions with descriptive names over large monilithic chunks
of code, so I grouped the compiler passes called from compileSourceModule
into funcitons named frontend, middle and backend. This also makes decisions
about which passes to run clearly visible up front.

Also made some small changes in GF.Compile.
</content>
</entry>
</feed>
