Commit Graph

191 Commits

Author SHA1 Message Date
krangelov c5b6432016 implemented tables and parameters 2021-09-24 17:20:25 +02:00
krangelov 4c6872615c remove RConcrete 2021-07-30 12:10:40 +02:00
krangelov 155657709a Merge branch 'master' into c-runtime 2021-07-30 11:20:04 +02:00
John J. Camilleri 0954b4cbab More cabal file cleanup. Remove some more tabs from Haskell source. 2021-07-07 13:04:09 +02:00
John J. Camilleri a2b23d5897 Make whitespace uniform in Cabal files, add a few more dependency bounds 2021-07-07 09:11:46 +02:00
John J. Camilleri e2e5033075 Merge pull request #122 from 2jacobtan/master
specify version bounds in *.cabal files
2021-07-06 14:31:29 +02:00
John J. Camilleri 84b4b6fab9 Some more cabal file cleanup. Add stack files for pgf, pgf2. 2021-07-06 14:11:30 +02:00
2jacobtan 12c564f97c specify version bounds in gf.cabal 2021-07-06 05:08:00 +08:00
John J. Camilleri 376b1234a2 Rename GF.Compile.TypeCheck.RConcrete to GF.Compile.TypeCheck.Concrete 2021-07-01 14:27:11 +02:00
John J. Camilleri 71d99b9ecb Rename GF.Compile.Compute.ConcreteNew to GF.Compile.Compute.Concrete 2021-07-01 14:21:29 +02:00
John J. Camilleri 1ba5449d21 Update pgf.cabal, and minors to other cabal files 2021-06-24 09:31:37 +02:00
Jacob Tan En 6179d79e72 Update gf.cabal
`cabal install` needs this
2021-06-11 13:23:18 +08:00
Ruslan Khafizov 1740181daf Enable tests 2020-11-10 19:15:57 +08:00
Andreas Källberg 9d8cd55cd5 Import orphan instances of MonadFail for ghc<8
Also upgrade alex/happy so automatic install works
2020-09-09 11:05:41 +02:00
Andreas Källberg 7268253f5a MonadFail: Make backwards-compatible 2020-09-05 20:23:07 +02:00
Andreas Källberg e351e7b79a Remove NoMonadFailDesugaring flag
I've fixed so everything has the fail it needs now
2020-08-05 18:48:24 +02:00
Thomas Hallgren 14e5528544 Fix build problems, bump versiom to gf-3.10.4-git
debian/rules and bin/build-binary-dist.sh needed to be adepted to changes
in how INSTALLPATH is used in src/runtime/java/Makefile.
2019-11-18 15:54:44 +01:00
krangelov eece3e86b3 Merge branch 'master' into c-runtime 2019-09-20 16:19:08 +02:00
krangelov 30eef61f0a more dead code 2019-09-20 16:15:28 +02:00
krangelov 4a71464ca7 Merge with master and drop the Haskell runtime completely 2019-09-19 22:01:57 +02:00
krangelov e993ae59f8 drop the haskell runtime, part 2 2019-09-19 10:06:06 +02:00
John J. Camilleri c5a75c482c Start work on PGFtoJSON module. Add compiler flag -f json. 2019-07-03 15:07:31 +02:00
krangelov 32379a8d11 fully supported case-insensitive parsing/lookup 2019-06-30 08:48:23 +02:00
Thomas Hallgren 86066d4b12 Eliminate the dependency on time-compat
It was only needed for compatibility with directory<1.2, but
directory>=1.2 has been shipped with ghc since ghc-7.6.

Note: time-compat-1.9.* (the current version) is a completely different
package, that does not provide the needed function toUTCTime, which
was provided in time-compat-0.1.*.
2019-05-15 12:05:38 +02:00
Thomas Hallgren 5b401f3880 Expose GF.Grammar.Canonical + some refactoring
to make it available in other tools by depending on the gf package and
importing it
2019-03-07 17:41:16 +01:00
Thomas Hallgren b783299b73 Rename module GF.Compile.ConcreteToCanonical to GF.Compile.GrammarToCanonical 2019-03-07 14:47:37 +01:00
Thomas Hallgren bf17fa0bb2 Bump version number to 3.10.3-git
This is not an announced realase, but this is version now installed on our
server.
2019-03-05 20:18:30 +01:00
Thomas Hallgren eb46577f58 debian/rules bug fix: the RGL was not included in .deb packages
The problem was that the RGL was both built and copied to the destdir
during the build step, which caused it to be deleted before the install
step. It is now copied to destdir during the install step.
2019-03-05 16:19:46 +01:00
krangelov bde1a6d586 fix the dependency to json 2019-02-26 19:32:08 +01:00
krangelov 25dc934871 replace aeson with json 2019-02-26 19:27:36 +01:00
Thomas Hallgren a928e4657e Need aeson>=1.3
Also remove ununsed GF.Compile.PGFtoAbstract
2019-02-21 14:43:53 +01:00
Peter Ljunglöf a0c1da2548 encoding/decoding canonical GF grammars to/from JSON and YAML 2019-02-08 09:10:04 +01:00
Thomas Hallgren e4abff7725 More work on the canonica_gf export
+ Abstract syntax now is converted directly from the Grammar and not via PGF,
  so you can use `gf -batch -no-pmcfg -f canonical_gf ...`, to export to
  canonical_gf while skipping PMCFG and PGF file generation completely.
+ Flags that are normally copied to PGF files are now included in the
  caninical_gf output as well (in particular the startcat flag).
2019-01-22 17:16:32 +01:00
Thomas Hallgren fc1b51aa95 Adding -output-format canonical_gf
This output format converts a GF grammar to a "canonical" GF grammar. A
canonical GF grammar consists of

 - one self-contained module for the abstract syntax
 - one self-contained module per concrete syntax

The concrete syntax modules contain param, lincat and lin definitions,
everything else has been eliminated by the partial evaluator, including
references to resource library modules and functors. Record types
and tables are retained.

The -output-format canonical_gf option writes canonical GF grammars to a
subdirectory "canonical/". The canonical GF grammars are written as
normal GF ".gf" source files, which can be compiled with GF in the normal way.

The translation to canonical form goes via an AST for canonical GF grammars,
defined in GF.Grammar.Canonical. This is a simple, self-contained format that
doesn't cover everyting in GF (e.g. omitting dependent types and HOAS), but it
is complete enough to translate the Foods and Phrasebook grammars found in
gf-contrib. The AST is based on the GF grammar "GFCanonical" presented here:

  https://github.com/GrammaticalFramework/gf-core/issues/30#issuecomment-453556553

The translation of concrete syntax to canonical form is based on the
previously existing translation of concrete syntax to Haskell, implemented
in module GF.Compile.ConcreteToHaskell. This module could now be reimplemented
and simplified significantly by going via the canonical format. Perhaps exports
to other output formats could benefit by going via the canonical format too.

There is also the possibility of completing the GFCanonical grammar
mentioned above and using GF itself to convert canonical GF grammars to
other formats...
2019-01-17 21:04:08 +01:00
Thomas Hallgren 5fe963dd02 Fix compilation with ghc-7.10
NoMonadFailDesugaring is not supported by ghc-7.10, but it is only needed
with ghc>=8.6
2019-01-16 14:42:34 +01:00
John J. Camilleri ee5ac81dfc Make GF compile with GHC 8.6.2
- Re-implement `Distribution.Simple.BuildPaths.exeExtension`
- Turn off `MonadFailDesugaring`

Tested with GHC:

- 7.10.3
- 8.0.2
- 8.2.2
- 8.4.3
- 8.6.2

Yay Stack!
2018-12-04 10:31:53 +01:00
Thomas Hallgren 60738dda6d gf.cabal: update tested-with 2018-12-02 21:20:54 +01:00
Thomas Hallgren 47c983c625 gf.cabal: remove redundant dependency on old-locale 2018-11-29 23:06:30 +01:00
John J. Camilleri 07768ba4c4 Revert "Completely remove uses of example-based"
This reverts commit 69cea20dac.
2018-11-28 19:23:05 +01:00
John J. Camilleri 69cea20dac Completely remove uses of example-based 2018-11-28 18:09:56 +01:00
John J. Camilleri 397f18a298 remove custom-binary flag; update Cabal version restriction; bump version to 3.10 2018-11-28 13:36:11 +01:00
Krasimir Angelov 5a2b200948 manually copy the "c-runtime" branch from the old repository. 2018-11-02 14:38:44 +01:00
Thomas Hallgren d9f0dfd400 gf.cabal: expose GF.Text.Lexing, needed by gf-server.cabal 2018-07-31 15:02:59 +02:00
John J. Camilleri 636a8142b4 Minimal update with new repo URLs & build instructions 2018-07-26 01:37:03 +02:00
John J. Camilleri e1dd7bfdf5 [GF Split] Post-split updates 2018-07-25 19:55:11 +02:00
John J. Camilleri 8b5532c1e9 Relax dependency on directory package for Setup
Since `listDirectory` is no longer used (852a49920)
2018-07-05 14:21:05 +02:00
Krasimir Angelov 73cf58da23 revert to a version compatible with Cabal 1.22 2018-07-05 13:10:02 +02:00
John J. Camilleri 0ef7fb8b0f Cleanup in Setup.hs; include custom-setup:setup-depends in cabal file. 2018-07-05 12:23:02 +02:00
John J. Camilleri b9b0217160 Remove code which tries to get version information from darcs folder 2018-07-04 13:40:46 +02:00
John J. Camilleri f0c5d53e78 Remove editor mode files from Haskell package (in gf.cabal) 2018-06-13 10:18:25 +02:00