mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-25 18:58:56 -06:00
Bump pgf2 to 1.1.0, update README
This commit is contained in:
@@ -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
|
||||||
pgf <- readPGF "Foo.pgf"
|
module Main where
|
||||||
let Just english = Map.lookup "FooEng" (languages pgf)
|
|
||||||
|
import PGF2
|
||||||
|
import qualified Data.Map as Map
|
||||||
|
|
||||||
|
main = do
|
||||||
|
pgf <- readPGF "Foo.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.
|
||||||
|
|||||||
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user