Bump pgf2 to 1.1.0, update README

This commit is contained in:
John J. Camilleri
2020-07-11 20:00:25 +02:00
parent f54e54123c
commit 88a73c1d9e
2 changed files with 36 additions and 16 deletions

View File

@@ -1,26 +1,46 @@
This is a binding to the new GF runtime in C. # PGF2
This is a Haskell binding to the PGF runtime in C.
The files are: The files are:
PGF2.hsc -- a user API similar to Python and Java APIs - PGF2.hsc: a user API similar to Python and Java APIs
PGF2/FFI.hs -- an internal module with FFI definitions for - PGF2/FFI.hs: an internal module with FFI definitions for the relevant C functions
-- the relevant C functions
HOW TO COMPILE: ## How to compile
```
cabal install cabal install
```
HOW TO USE: **Note:** you must have the PGF C runtime already installed and available.
See <https://github.com/GrammaticalFramework/gf-core/blob/master/src/runtime/c/INSTALL>
- Import PGF to the Haskell program that you're writing. ## How to use
The Cabal infrastructure will make sure to tell the compiler
where to find the relevant modules. Example:
module Main where Import PGF to the Haskell program that you're writing.
The Cabal infrastructure will make sure to tell the compiler
where to find the relevant modules.
import PGF2 ## Example
import qualified Data.Map as Map
main = do ```haskell
module Main where
import PGF2
import qualified Data.Map as Map
main = do
pgf <- readPGF "Foo.pgf" pgf <- readPGF "Foo.pgf"
let Just english = Map.lookup "FooEng" (languages pgf) let Just english = Map.lookup "FooEng" (languages pgf)
```
## Changelog
### 1.1.0
Remove SG library.
### 1.0.0
Everything up until 2020-07-11.

View File

@@ -1,5 +1,5 @@
name: pgf2 name: pgf2
version: 1.0.0 version: 1.1.0
synopsis: Bindings to the Grammatical Framework C runtime synopsis: Bindings to the Grammatical Framework C runtime
description: description:
GF, Grammatical Framework, is a programming language for multilingual grammar applications. GF, Grammatical Framework, is a programming language for multilingual grammar applications.