Commit Graph
67 Commits
Author SHA1 Message Date
Thomas Hallgren 951b884118 Export of concrete syntax to Haskell now goes via Canonical GF
TODO: better treatment of Predef functions and record subtyping coercions
2019-01-23 02:47:10 +01:00
Thomas Hallgren fc5c2b5a22 PGF.Haskell.fromStr: fix double spaces caused by empty tokens 2019-01-23 02:45:23 +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 a40130ddc4 gfse: prevent scrolling during drag-and-drop on iOS
Applies to webkit-based browsers on other touch-based platforms too
2019-01-21 21:18:01 +01:00
Thomas Hallgren 71307d6518 Two fixes in GF.Grammar.Canonical
+ Hide Prelude.<> to avoid ambiguity with ghc-8.6
+ Vertical alternative in the pretty printer for table types A => B
2019-01-18 14:44:45 +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
Thomas Hallgren 1a842efeaf downloads: add .deb package for Ubuntu (32-bit) 2018-12-03 16:10:01 +01:00
Thomas Hallgren de005b9df3 Merge branch 'master' of https://github.com/GrammaticalFramework/gf-core 2018-12-03 15:53:36 +01:00
Thomas Hallgren 52bc0f566e debian/control: new dependency: pandoc
This should have been added before the 3.10 release
2018-12-03 15:52:52 +01:00
Thomas Hallgren bd7bb9b34a Merge branch 'master' of https://github.com/GrammaticalFramework/gf-core 2018-12-03 01:34:49 +01:00
Thomas Hallgren 18251e57a3 debian/changelog: updated release date 2018-12-03 01:33:52 +01:00
Thomas Hallgren d06539c35c Merge branch 'master' of https://github.com/GrammaticalFramework/gf-core 2018-12-02 21:21:18 +01:00
Thomas Hallgren 60738dda6d gf.cabal: update tested-with 2018-12-02 21:20:54 +01:00
Thomas Hallgren 769743c5c0 Minor fixes on the GF 3.10 download page 2018-12-02 15:29:55 +01:00
Thomas Hallgren 1c75d417ee Move 3.10 download page into place, update release date 2018-12-02 15:08:40 +01:00
Thomas Hallgren e6c2c844e9 GF.Main: leave the code page unchanged on Windows
This should make it easier to use GF with UTF-8 in the Windows Console
See https://groups.google.com/forum/#!topic/gf-dev/DCou6FDhCnU
2018-12-01 15:53:58 +01:00
Thomas Hallgren 883a7a95a1 build-binary-dist.sh: make it easy to choose which version of ghc to use 2018-12-01 15:53:27 +01:00
Thomas Hallgren 5ef390f188 Merge branch 'master' of https://github.com/GrammaticalFramework/gf-core 2018-11-30 00:47:10 +01:00
Thomas Hallgren fa5c6a2949 Fix spelling mistake on GF 3.9 download page 2018-11-30 00:46:24 +01:00
Thomas Hallgren d0bc368358 Update make deb for the GF 3.10 release
This includes adding commands in debian/rules to build and include
the RGL and the example grammars in the debian package.
2018-11-30 00:17:45 +01:00
Thomas Hallgren e0dca729d6 WebSetup.hs: don't output messages that lie about what's being installed 2018-11-30 00:15:37 +01:00
Thomas Hallgren 47c983c625 gf.cabal: remove redundant dependency on old-locale 2018-11-29 23:06:30 +01:00
Thomas Hallgren 32ce03dc94 bin/build-binary-dist.sh: include the RGL in binary distributions
TODO: the corresponding changes in debian/rules
2018-11-28 17:27:29 +01:00
Thomas Hallgren 8596fc5d26 Revert CSS change that produces overlapping text instead of responsive layout 2018-11-06 23:49:06 +01:00
Thomas Hallgren effa818408 gf -cshell bug fix
The functions cExpr and hsExpr in GF.Command.Commands2 need to
handle string literals.
2018-10-16 16:23:54 +02:00
Thomas Hallgren 6b1e21508e Comment out links to some old demos that no longer work 2018-10-10 14:22:24 +02:00
Thomas Hallgren d9f0dfd400 gf.cabal: expose GF.Text.Lexing, needed by gf-server.cabal 2018-07-31 15:02:59 +02:00
Thomas Hallgren 4fd1ec71c9 gf-server.cabal: relax network version bounds and make building the library and pgf-service executable optional
This allows you to build the content-service without installing the problematic fastcgi library.
2018-07-31 14:29:18 +02:00
Thomas Hallgren 23961ef0b3 GF.Server: add 'import Control.Applicative' for compatibilit with GHC<7.10
One could also add stricter version constraints in gf.cabal, e.g.
base>=4.8 (implies GHC>=7.10) if we want to only support building with
GHC>=7.10.
2018-06-27 17:40:35 +02:00
Thomas Hallgren 6f707461e1 gf.cabal: use -fhide-source-paths
if ghc>=8.2
2018-04-18 19:30:03 +02:00
Thomas Hallgren 820d2d503f Fixes for GHC 8.4.1 compatibility
* In GHC 8.4.1, the operator <> has become a method of the Semigroup class
  and is exported from the Prelude. This is unfortunate, since <> is also
  exported from the standard library module Text.PrettyPrint, so in any
  module that defines a pretty printer, there is likely to be an ambiguity.

  This affects ~18 modules in GF. Solution:

    import Prelude hiding (<>)

  This works also in older versions of GHC, since GHC does't complain if
  you hide something that doesn't exists.

* In GHC 8.4.1, Semigroup has become a superclass of Monoid. This means
  that anywhere you define an instance of the Monoid class you also have to
  define an instance in the Semigroup class.

  This affects Data.Binary.Builder in GF. Solution: conditionally define
  a Semigroup instance if compiling with base>=4.11 (ghc>=8.4.1)
2018-04-18 19:18:10 +02:00
Thomas Hallgren 3d6a5e8864 gfse: show grammar comments in the list of public grammars
gf -server now includes the comment field from the grammar in the
response to /cloud requests with command=ls-t and ext=.json
2018-03-29 18:23:32 +02:00
Thomas Hallgren 750a1349ff gfse: allow public grammars to be deleted in more cases
The editor doesn't show delete buttons on grammars published by other
users, but it was too picky when deciding which grammars you own. Now
it should be possible to delete grammars from the device/browser
you published it from, even if you don't have a private copy of it any more.

On a related note, there seems to be problem with the way unique grammars
names are created and maintained, causing published grammars to be duplicated
in some cases. This needs to be overhauled.
2018-03-29 17:02:22 +02:00
Thomas Hallgren 78cf184957 gfse: fix for some browser: hovering over an empty grammar comment to edit it
This was a problem in Safari (an other similar browsers I presume), but
not in Firefox: hovering over the grammar comment (shown below the grammar
name when you edit a grammar) didn't reveal the button to edit it, thus
preventing you from adding a comment. It was till possible by selecting the
"Enable editing on touch devices." at the bottom of the screen, but most
people probably didn't notice that it is possible to add a comment.
2018-03-29 16:17:25 +02:00
Thomas Hallgren a9135c9b7e Merge branch 'master' of www.grammaticalframework.org:/usr/local/www/GF 2018-03-29 14:56:07 +02:00
Thomas Hallgren 31ef32a815 gfse: sort list of public grammars by age, by default
There is also a menu so you can choose to sort the list by name or by age
2018-03-29 14:54:42 +02:00
Thomas Hallgren 6cc95f664e index.html: update summer school link 2018-01-29 11:28:11 +01:00
Thomas Hallgren 725b518d5c demos/index.html: add link to multilingual_headlines.html
It was lost in the move from darcs to GIT, since it was added
with a local change and not recorded in the darcs repository.
2018-01-23 15:58:28 +01:00
Thomas Hallgren 5164951e23 Remove "Warning: default encoding has changed from Latin-1 to UTF-8"
The warning is about a change that was made in GF 3.6 (June 2014) and has
probably outlived its purpose by now.
2018-01-23 14:55:33 +01:00
Thomas Hallgren 9f7a6cfe10 PGF2.FFI: import Data.Word(Word)
for compatibility with older versions of GHC
2017-09-06 18:01:08 +02:00
Thomas Hallgren 2b52ff1f73 Merge https://github.com/GrammaticalFramework/GF 2017-09-01 11:02:02 +02:00
Thomas Hallgren c75d95b313 Merge https://github.com/GrammaticalFramework/GF 2017-08-29 16:00:04 +02:00
Thomas Hallgren 1f4807105b Merge https://github.com/GrammaticalFramework/GF 2017-08-29 12:00:05 +02:00
Thomas Hallgren 685307bf0d Merge branch 'master' of www.grammaticalframework.org:/usr/local/www/GF 2017-08-28 21:37:35 +02:00
Thomas Hallgren fe2aeb839b Download page: adding a .deb package for the Raspberry Pi 2017-08-28 21:37:09 +02:00
Thomas Hallgren 4e4d07aeae Merge https://github.com/GrammaticalFramework/GF 2017-08-28 17:20:03 +02:00
Thomas Hallgren 7ec6590389 Merge https://github.com/GrammaticalFramework/GF 2017-08-24 18:20:03 +02:00
Thomas Hallgren 84c262a8e1 Merge https://github.com/GrammaticalFramework/GF 2017-08-21 13:15:46 +02:00
Thomas Hallgren a16ae62503 Merge https://github.com/GrammaticalFramework/GF 2017-08-21 09:40:03 +02:00
Thomas Hallgren 13aff8a704 Merge https://github.com/GrammaticalFramework/GF 2017-08-20 22:20:03 +02:00
Thomas Hallgren 0a0eaa01bc Bump version requirements to base>=4.6, Cabal>=1.20
Cabal>=1.20 allows control over parallelism when compiling grammars from
Setup.hs and WebSetup.hs.

base>=4.6 allows conditional compilation with CPP to be eliminated from
a few modules.

base-4.6 corresponds to GHC 7.6.3, which is what you get in
Debian 8 (aka jessie, aka oldstable) from 2015.
2017-08-18 11:55:44 +02:00
Thomas Hallgren 5ab8b7082c Merge branch 'master' of www.grammaticalframework.org:/usr/local/www/GF 2017-08-18 11:55:16 +02:00
Thomas Hallgren 1318a62da0 Home page: update link to PGF library API (Haskell)
to point to gf-3.9 in Hackage.
2017-08-18 11:54:13 +02:00
Thomas Hallgren c642421fa9 configure.ac: use a Cabal-friendly version number
and replace the outdated URL
2017-08-17 11:58:23 +02:00
Thomas Hallgren 2d85550e54 Final changes before the release of GF 3.9 2017-08-11 21:11:24 +02:00
Thomas Hallgren 06bf8454f7 Merge branch 'master' of www.grammaticalframework.org:/usr/local/www/GF 2017-08-11 16:05:44 +02:00
Thomas Hallgren da1272c36d Some updates in index-next.t2t and release-next.t2t 2017-08-11 16:04:57 +02:00
Thomas Hallgren ce1c1042e7 gf.cabal: don't enable warnings about unused imports by default 2017-08-11 15:45:19 +02:00
Thomas Hallgren 8484dabd5b Disable detailed version info from darcs
TODO: get version info from git instead.
2017-08-11 15:33:21 +02:00
Thomas Hallgren a0e7e3bf83 A couple of fixes for GHC 8.2.1 compatibility 2017-08-11 10:07:43 +02:00
Thomas Hallgren cd817abc5a Merge branch 'master' of /usr/local/www/GF 2017-06-30 15:46:46 +02:00
Thomas Hallgren b87cefb8cf gf.cabal: update bug-reports and tested-with 2017-06-30 15:46:07 +02:00
Thomas Hallgren a0072a5487 Updates to reflect the darcs->git move in the developer guide and the download page & release notes for the next release 2017-06-30 15:16:52 +02:00
Thomas Hallgren ff82b0980b Link to the issue tracker on GitHub 2017-06-29 17:27:36 +02:00
Thomas Hallgren 366f75d78a index.html: a quick news item about the move to GitHub 2017-06-29 15:15:52 +02:00
Thomas Hallgren 1ada3fc522 gf.cabal: update the source repository to point to the GitHub repository 2017-06-29 14:51:27 +02:00