gf: Grammatical Framework

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

GF, Grammatical Framework, is a programming language for multilingual grammar applications


[Skip to Readme]

Properties

Versions 3.1.6, 3.1.6.1, 3.1.6.2, 3.2, 3.2.9, 3.3, 3.3.3, 3.4, 3.5, 3.6, 3.7, 3.7.1, 3.8, 3.9, 3.10, 3.11, 3.11.0, 3.12, 3.12.0
Change log CHANGELOG.md
Dependencies array (>=0.5.1 && <0.6), base (>=4.9.1 && <4.22), bytestring (>=0.10.8 && <0.12), cgi (>=3001.3.0.2 && <3001.6), containers (>=0.5.7 && <0.7), directory (>=1.3.0 && <1.4), exceptions (>=0.8.3 && <0.11), fail (>=4.9.0 && <4.10), filepath (>=1.4.1 && <1.5), gf, ghc-prim (>=0.5.0 && <=0.10.0), haskeline (>=0.7.3 && <0.9), httpd-shed (>=0.4.0 && <0.5), json (>=0.9.1 && <=0.11), mtl (>=2.2.1 && <=2.3.1), network (>=2.5 && <3.2), network-uri (>=2.6.1.0 && <2.7), parallel (>=3.2.1.1 && <3.3), pretty (>=1.1.3 && <1.2), process (>=1.4.3 && <1.7), random (>=1.1 && <1.3), template-haskell (>=2.13.0.0 && <2.21), terminfo (>=0.4.0 && <0.5), time (>=1.6.0 && <=1.12.2), transformers-compat (>=0.6.3 && <0.7), unix (>=2.7.2 && <2.9), utf8-string (>=1.0.1.1 && <1.1), Win32 (>=2.3.1.1 && <2.7) [details]
License LicenseRef-OtherLicense
Author
Maintainer John J. Camilleri <john@digitalgrammars.com>
Category Natural Language Processing, Compiler
Home page https://www.grammaticalframework.org/
Bug tracker https://github.com/GrammaticalFramework/gf-core/issues
Source repo head: git clone https://github.com/GrammaticalFramework/gf-core.git
Uploaded by anka213 at 2025-08-08T19:28:37Z

Modules

Flags

Automatic Flags
NameDescriptionDefault
interrupt

Enable Ctrl+Break in the shell

Enabled
server

Include --server mode

Enabled
network-uri

Get Network.URI from the network-uri package

Enabled
c-runtime

Include functionality from the C run-time library (which must be installed already)

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for gf-3.12

[back to package description]

GF Logo

Grammatical Framework (GF)

The Grammatical Framework is a grammar formalism based on type theory. It consists of:

The compiler reads GF grammars from user-provided files, and the generic grammar processor performs various tasks with the grammars:

GF particularly addresses four aspects of grammars:

Compilation and installation

The simplest way of installing GF from source is with the command:

cabal install

or:

stack install

Note that if you are unlucky to have Cabal 3.0 or later, then it uses the so-called Nix style commands. Using those for GF development is a pain. Every time when you change something in the source code, Cabal will generate a new folder for GF to look for the GF libraries and the GF cloud. Either reinstall everything with every change in the compiler, or be sane and stop using cabal-install. Instead you can do:

runghc Setup.hs configure
runghc Setup.hs build
sudo runghc Setup.hs install

The script will install the GF dependencies globally. The only solution to the Nix madness that I found is radical:

"No person, no problem" (Нет человека – нет проблемы).

For more information, including links to precompiled binaries, see the download page.

About this repository

On 2018-07-25, the monolithic GF repository was split in two:

  1. gf-core — the GF compiler, shell and runtimes
  2. gf-rgl — the resource grammar library

The former repository is now archived and no longer updated. The split was performed using this script and the output of that script is here.