From 2d85550e5466c18f248321f7eab333025098ea53 Mon Sep 17 00:00:00 2001 From: Thomas Hallgren Date: Fri, 11 Aug 2017 21:11:24 +0200 Subject: [PATCH 1/4] Final changes before the release of GF 3.9 --- bin/build-binary-dist.sh | 0 bin/gfmap | 0 bin/update_html | 0 debian/changelog | 6 ++ download/{index-next.t2t => index-3.8.t2t} | 68 ++++++++-------- download/index.t2t | 77 ++++++++++--------- .../{release-next.t2t => release-3.9.t2t} | 23 ++---- gf.cabal | 2 +- index.html | 4 +- src/runtime/c/setup.sh | 0 10 files changed, 91 insertions(+), 89 deletions(-) mode change 100644 => 100755 bin/build-binary-dist.sh mode change 100644 => 100755 bin/gfmap mode change 100644 => 100755 bin/update_html rename download/{index-next.t2t => index-3.8.t2t} (69%) rename download/{release-next.t2t => release-3.9.t2t} (94%) mode change 100644 => 100755 src/runtime/c/setup.sh diff --git a/bin/build-binary-dist.sh b/bin/build-binary-dist.sh old mode 100644 new mode 100755 diff --git a/bin/gfmap b/bin/gfmap old mode 100644 new mode 100755 diff --git a/bin/update_html b/bin/update_html old mode 100644 new mode 100755 diff --git a/debian/changelog b/debian/changelog index 476d09d0b..b3cb6db35 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +gf (3.9-1) vivid xenial zesty; urgency=low + + * GF 3.9 + + -- Thomas Hallgren Fri, 11 Aug 2017 20:00:00 +0200 + gf (3.8-1) precise trusty vivid; urgency=low * GF 3.8 diff --git a/download/index-next.t2t b/download/index-3.8.t2t similarity index 69% rename from download/index-next.t2t rename to download/index-3.8.t2t index 4f44ccc5b..1222cdff1 100644 --- a/download/index-next.t2t +++ b/download/index-3.8.t2t @@ -7,21 +7,21 @@ Grammatical Framework Download and Installation %!postproc(html): %!postproc(html): -**GF 3.9** will be released on ?? August 2017. +**GF 3.8** was released on 22 June 2016. -What's new? See the [Release notes release-3.9.html]. +What's new? See the [Release notes release-3.8.html]. == Binary packages == || Platform | Download | Features | How to install -| macOS | [gf-3.9.pkg gf-3.9.pkg] | //GF+S+C+J+P// | Double-click on the package icon (*) -| macOS | [gf-3.9-bin-intel-mac.tar.gz gf-3.9-bin-intel-mac.tar.gz] | //GF+S+C+J+P// | ``sudo tar -C /usr/local -zxf gf-3.9-bin-intel-mac.tar.gz`` +| Mac OS X | [gf-3.8.pkg gf-3.8.pkg] | //GF+S+C+P// | Double-click on the package icon (*) +| Mac OS X | [gf-3.8-bin-intel-mac.tar.gz gf-3.8-bin-intel-mac.tar.gz] | //GF+S+C+P// | ``sudo tar -C /usr/local -zxf gf-3.8-bin-intel-mac.tar.gz`` %| Fedora (32-bit) | [Fedora RPMs /~hallgren/tmp/Fedora/] | //GF+S+C+J+P// | ``sudo rpm -i ...`` -| Ubuntu (32-bit) | [gf_3.9-1_i386.deb gf_3.9-1_i386.deb] | //GF+S+C+J+P// | ``sudo dpkg -i gf_3.9-1_i386.deb`` -| Ubuntu (64-bit) | [gf_3.9-1_amd64.deb gf_3.9-1_amd64.deb] | //GF+S+C+J+P// | ``sudo dpkg -i gf_3.9-1_amd64.deb`` -| Windows | [gf-3.9-bin-windows.zip gf-3.9-bin-windows.zip] | //GF+S// | ``unzip gf-3.9-bin-windows.zip`` -%| MINGW | [gf-3.9-bin-i686-MINGW32_NT-6.1.tar.gz gf-3.9-bin-i686-MINGW32_NT-6.1.tar.gz] | //GF+S+C// | ``tar -C / gf-3.9-bin-i686-MINGW32_NT-6.1.tar.gz`` +| Ubuntu (32-bit) | [gf_3.8-1_i386.deb gf_3.8-1_i386.deb] | //GF+S+C+J+P// | ``sudo dpkg -i gf_3.8-1_i386.deb`` +| Ubuntu (64-bit) | [gf_3.8-1_amd64.deb gf_3.8-1_amd64.deb] | //GF+S+C+J+P// | ``sudo dpkg -i gf_3.8-1_amd64.deb`` +| Windows | [gf-3.8-bin-windows.zip gf-3.8-bin-windows.zip] | //GF+S// | ``unzip gf-3.8-bin-windows.zip`` +%| MINGW | [gf-3.8-bin-i686-MINGW32_NT-6.1.tar.gz gf-3.8-bin-i686-MINGW32_NT-6.1.tar.gz] | //GF+S+C// | ``tar -C / gf-3.8-bin-i686-MINGW32_NT-6.1.tar.gz`` %| ... | ... | ... | ... Features: GF = GF shell and grammar compiler and the Resource Grammar Library, @@ -44,14 +44,13 @@ variables, see Inari's notes on %(which is started with ``C:\MinGW\msys\1.0\msys.bat``). %It should work out of the box without any additional settings. -The ``.deb`` packages should work on Ubuntu 16.04 and 17.04 and similar +The ``.deb`` packages should work on Ubuntu 12.04, 14.04 and 16.04 and similar Linux distributions. -The packages for macOS (Mac OS X) should work on at -least 10.11 and 10.12 (El Capitan and Sierra). +The packages for Mac OS X should work on at least 10.9, 10.10 and 10.11 (Mavericks, Yosemite and El Capitan). -(*) **Note** that for compatibility with OS X 10.11 and newer, -``gf-3.9.pkg`` will install the ``gf`` executable in ``/usr/local/bin`` +(*) **Note** that for compatibility with OS X 10.11, +``gf-3.8.pkg`` will install the ``gf`` executable in ``/usr/local/bin`` instead of ``/usr/bin``, so make sure ``/usr/local/bin`` is in your ``$PATH``. Also, if you still have an older version of GF installed in ``/usr/bin``, remove it and/or make sure ``/usr/local/bin`` comes before ``/usr/bin`` @@ -63,7 +62,7 @@ You can install them in other locations, but then you need to set the ``GF_LIB_PATH`` environment variable: ``` - export GF_LIB_PATH=/usr/local/share/gf-3.9/lib + export GF_LIB_PATH=/usr/local/share/gf-3.8/lib ``` where ``/usr/local`` should be replaced with the path to the location where you @@ -85,7 +84,7 @@ circumstances the prodedure is fairly simple: You can also download the full source package from here: -[``gf-3.9.tar.gz`` gf-3.9.tar.gz]. +[``gf-3.8.tar.gz`` gf-3.8.tar.gz]. === Notes === @@ -116,21 +115,21 @@ manually. Here is one way to do this: **Note 2**. -The GF source code has been updated to compile with GHC 8.2.1. Using older -versions of GHC (e.g. 8.0.x and 7.10.3) should still work too. +The GF source code has been updated to compile with GHC 8.0.1. Using older +versions of GHC (7.10.3, 7.10.2, 7.8, 7.6) should work too. -%=== Known problems === -% -%There seems to be a bug in some versions of Cabal that can cause -% -%``` -% Distribution/Simple/PackageIndex.hs:124:8-13: Assertion failed -%``` -% -%if the same version of GF is -%already installed. If you encounter this, you can use ``ghc-pkg unregister gf`` -%to remove the installed version of GF and ``ghc-pkg list gf`` to verify that -%it is gone. +=== Known problems === + +There seems to be a bug in some versions of Cabal that can cause + +``` + Distribution/Simple/PackageIndex.hs:124:8-13: Assertion failed +``` + +if the same version of GF is +already installed. If you encounter this, you can use ``ghc-pkg unregister gf`` +to remove the installed version of GF and ``ghc-pkg list gf`` to verify that +it is gone. ==Installing from the latest developer source code== @@ -138,7 +137,7 @@ The first time: %, assuming you already have the Haskell Platform and darcs ``` - git clone https://github.com/GrammaticalFramework/GF.git + darcs get --lazy http://www.grammaticalframework.org/ GF cd GF cabal install ``` @@ -147,13 +146,13 @@ Subsequently: ``` cd GF - git pull + darcs pull -a cabal install ``` -%Alternatively, you can get the code from the -%[GF GitHub https://github.com/GrammaticalFramework/GF/] mirror, which is -%updated nightly. +Alternatively, you can get the code from the +[GF GitHub https://github.com/GrammaticalFramework/GF/] mirror, which is +updated nightly. The above notes for installing from source apply also in these cases. For more info on working with the GF source code, see the @@ -161,7 +160,6 @@ For more info on working with the GF source code, see the ==Older releases== -- [GF 3.8 index-3.8.html] (June 2016) - [GF 3.7.1 index-3.7.1.html] (October 2015) - [GF 3.7 index-3.7.html] (June 2015) - [GF 3.6 index-3.6.html] (June 2014) diff --git a/download/index.t2t b/download/index.t2t index 1222cdff1..1fc8f0681 100644 --- a/download/index.t2t +++ b/download/index.t2t @@ -7,21 +7,22 @@ Grammatical Framework Download and Installation %!postproc(html): %!postproc(html): -**GF 3.8** was released on 22 June 2016. +**GF 3.9** was released on 11 August 2017. -What's new? See the [Release notes release-3.8.html]. +What's new? See the [Release notes release-3.9.html]. == Binary packages == || Platform | Download | Features | How to install -| Mac OS X | [gf-3.8.pkg gf-3.8.pkg] | //GF+S+C+P// | Double-click on the package icon (*) -| Mac OS X | [gf-3.8-bin-intel-mac.tar.gz gf-3.8-bin-intel-mac.tar.gz] | //GF+S+C+P// | ``sudo tar -C /usr/local -zxf gf-3.8-bin-intel-mac.tar.gz`` +| macOS | [gf-3.9.pkg gf-3.9.pkg] | //GF+S+C+J+P// | Double-click on the package icon +| macOS | [gf-3.9-bin-intel-mac.tar.gz gf-3.9-bin-intel-mac.tar.gz] | //GF+S+C+J+P// | ``sudo tar -C /usr/local -zxf gf-3.9-bin-intel-mac.tar.gz`` %| Fedora (32-bit) | [Fedora RPMs /~hallgren/tmp/Fedora/] | //GF+S+C+J+P// | ``sudo rpm -i ...`` -| Ubuntu (32-bit) | [gf_3.8-1_i386.deb gf_3.8-1_i386.deb] | //GF+S+C+J+P// | ``sudo dpkg -i gf_3.8-1_i386.deb`` -| Ubuntu (64-bit) | [gf_3.8-1_amd64.deb gf_3.8-1_amd64.deb] | //GF+S+C+J+P// | ``sudo dpkg -i gf_3.8-1_amd64.deb`` -| Windows | [gf-3.8-bin-windows.zip gf-3.8-bin-windows.zip] | //GF+S// | ``unzip gf-3.8-bin-windows.zip`` -%| MINGW | [gf-3.8-bin-i686-MINGW32_NT-6.1.tar.gz gf-3.8-bin-i686-MINGW32_NT-6.1.tar.gz] | //GF+S+C// | ``tar -C / gf-3.8-bin-i686-MINGW32_NT-6.1.tar.gz`` +%| Raspian 8.0 | [gf_3.9-1_armhf.deb gf_3.9-1_armhf.deb] | //GF+S+C+J+P// | ``sudo dpkg -i gf_3.9-1_armhf.deb`` +| Ubuntu (32-bit) | [gf_3.9-1_i386.deb gf_3.9-1_i386.deb] | //GF+S+C+J+P// | ``sudo dpkg -i gf_3.9-1_i386.deb`` +| Ubuntu (64-bit) | [gf_3.9-1_amd64.deb gf_3.9-1_amd64.deb] | //GF+S+C+J+P// | ``sudo dpkg -i gf_3.9-1_amd64.deb`` +| Windows | [gf-3.9-bin-windows.zip gf-3.9-bin-windows.zip] | //GF+S// | ``unzip gf-3.9-bin-windows.zip`` +%| MINGW | [gf-3.9-bin-i686-MINGW32_NT-6.1.tar.gz gf-3.9-bin-i686-MINGW32_NT-6.1.tar.gz] | //GF+S+C// | ``tar -C / gf-3.9-bin-i686-MINGW32_NT-6.1.tar.gz`` %| ... | ... | ... | ... Features: GF = GF shell and grammar compiler and the Resource Grammar Library, @@ -44,17 +45,18 @@ variables, see Inari's notes on %(which is started with ``C:\MinGW\msys\1.0\msys.bat``). %It should work out of the box without any additional settings. -The ``.deb`` packages should work on Ubuntu 12.04, 14.04 and 16.04 and similar +The ``.deb`` packages should work on Ubuntu 16.04 and 17.04 and similar Linux distributions. -The packages for Mac OS X should work on at least 10.9, 10.10 and 10.11 (Mavericks, Yosemite and El Capitan). +The packages for macOS (Mac OS X) should work on at +least 10.11 and 10.12 (El Capitan and Sierra). -(*) **Note** that for compatibility with OS X 10.11, -``gf-3.8.pkg`` will install the ``gf`` executable in ``/usr/local/bin`` -instead of ``/usr/bin``, so make sure ``/usr/local/bin`` is in your ``$PATH``. -Also, if you still have an older version of GF installed in ``/usr/bin``, -remove it and/or make sure ``/usr/local/bin`` comes before ``/usr/bin`` -in your ``$PATH`` so you don't accidentally run the old version. +%(*) **Note** that for compatibility with OS X 10.11 and newer, +%``gf-3.9.pkg`` will install the ``gf`` executable in ``/usr/local/bin`` +%instead of ``/usr/bin``, so make sure ``/usr/local/bin`` is in your ``$PATH``. +%Also, if you still have an older version of GF installed in ``/usr/bin``, +%remove it and/or make sure ``/usr/local/bin`` comes before ``/usr/bin`` +%in your ``$PATH`` so you don't accidentally run the old version. The Mac OS and Linux ``.tar.gz`` packages are designed to be installed in ``/usr/local``. @@ -62,7 +64,7 @@ You can install them in other locations, but then you need to set the ``GF_LIB_PATH`` environment variable: ``` - export GF_LIB_PATH=/usr/local/share/gf-3.8/lib + export GF_LIB_PATH=/usr/local/share/gf-3.9/lib ``` where ``/usr/local`` should be replaced with the path to the location where you @@ -84,7 +86,7 @@ circumstances the prodedure is fairly simple: You can also download the full source package from here: -[``gf-3.8.tar.gz`` gf-3.8.tar.gz]. +[``gf-3.9.tar.gz`` gf-3.9.tar.gz]. === Notes === @@ -115,21 +117,21 @@ manually. Here is one way to do this: **Note 2**. -The GF source code has been updated to compile with GHC 8.0.1. Using older -versions of GHC (7.10.3, 7.10.2, 7.8, 7.6) should work too. +The GF source code has been updated to compile with GHC 8.2.1. Using older +versions of GHC (e.g. 8.0.x and 7.10.3) should still work too. -=== Known problems === - -There seems to be a bug in some versions of Cabal that can cause - -``` - Distribution/Simple/PackageIndex.hs:124:8-13: Assertion failed -``` - -if the same version of GF is -already installed. If you encounter this, you can use ``ghc-pkg unregister gf`` -to remove the installed version of GF and ``ghc-pkg list gf`` to verify that -it is gone. +%=== Known problems === +% +%There seems to be a bug in some versions of Cabal that can cause +% +%``` +% Distribution/Simple/PackageIndex.hs:124:8-13: Assertion failed +%``` +% +%if the same version of GF is +%already installed. If you encounter this, you can use ``ghc-pkg unregister gf`` +%to remove the installed version of GF and ``ghc-pkg list gf`` to verify that +%it is gone. ==Installing from the latest developer source code== @@ -137,7 +139,7 @@ The first time: %, assuming you already have the Haskell Platform and darcs ``` - darcs get --lazy http://www.grammaticalframework.org/ GF + git clone https://github.com/GrammaticalFramework/GF.git cd GF cabal install ``` @@ -146,13 +148,13 @@ Subsequently: ``` cd GF - darcs pull -a + git pull cabal install ``` -Alternatively, you can get the code from the -[GF GitHub https://github.com/GrammaticalFramework/GF/] mirror, which is -updated nightly. +%Alternatively, you can get the code from the +%[GF GitHub https://github.com/GrammaticalFramework/GF/] mirror, which is +%updated nightly. The above notes for installing from source apply also in these cases. For more info on working with the GF source code, see the @@ -160,6 +162,7 @@ For more info on working with the GF source code, see the ==Older releases== +- [GF 3.8 index-3.8.html] (June 2016) - [GF 3.7.1 index-3.7.1.html] (October 2015) - [GF 3.7 index-3.7.html] (June 2015) - [GF 3.6 index-3.6.html] (June 2014) diff --git a/download/release-next.t2t b/download/release-3.9.t2t similarity index 94% rename from download/release-next.t2t rename to download/release-3.9.t2t index 6dad61389..fc1e71447 100644 --- a/download/release-next.t2t +++ b/download/release-3.9.t2t @@ -24,6 +24,11 @@ Over 200 changes have been pushed to the source repository since ===GF compiler and run-time library=== + +====New features and notable changes==== + +- Support for language-specific depencency configurations (in addition to abstract syntax based ones); see ``help vd`` in the GF shell + - An experimental support for sentence lookup which makes it possible to find the sentence from the grammar that matches best a set of keywords. Right now it is usable only with controlled languages since it might be @@ -34,19 +39,10 @@ very innefficient for some grammars. - The API in the Java binding is extended and it covers more from the full functionality of the C runtime. -====New features and notable changes==== - -- Support for language-specific depencency configurations (in addition to abstract syntax based ones); see ``help vd`` in the GF shell - - -====Other changes and bug fixes==== - -- ... - ====Changes of interest to compiler developers==== -- The compiler source code has been updated for compatibility with GHC 8.2.1 +- The compiler source code has been updated for compatibility with GHC 8.2.1. ===Resource Grammar Library=== @@ -62,18 +58,15 @@ the full functionality of the C runtime. - Various fixes for several languages. - - ... - -- Numerous fixes in the translation dictionaries. - - ... +- Various fixes in the translation dictionaries. ===Apps and Cloud services=== - PGF service: support for language-specific depencency configurations in ``command=deptree``. -- ... + -------------------- diff --git a/gf.cabal b/gf.cabal index 92e041799..38dc6ddb9 100644 --- a/gf.cabal +++ b/gf.cabal @@ -1,5 +1,5 @@ name: gf -version: 3.8-darcs +version: 3.9 cabal-version: >= 1.10 build-type: Custom diff --git a/index.html b/index.html index 050de9c31..824dfe23a 100644 --- a/index.html +++ b/index.html @@ -81,7 +81,7 @@ function sitesearch() {
  • GF build status -->
  • GF Developers Guide -
  • GitHub mirror +
  • GF on GitHub
  • Contibutions GitHub
  • Wiki
  • Browse Source Code @@ -120,6 +120,8 @@ document.write('
    Release notes. 2017-06-29:GF is moving to GitHub! 2017-03-13:GF Summer School in Riga (Latvia), 14-25 August 2017 Summer diff --git a/src/runtime/c/setup.sh b/src/runtime/c/setup.sh old mode 100644 new mode 100755 From c642421fa97201769aac10e4c053db22537fa9c1 Mon Sep 17 00:00:00 2001 From: Thomas Hallgren Date: Thu, 17 Aug 2017 11:58:23 +0200 Subject: [PATCH 2/4] configure.ac: use a Cabal-friendly version number and replace the outdated URL --- src/runtime/c/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/c/configure.ac b/src/runtime/c/configure.ac index 2af9016de..f52479a5b 100644 --- a/src/runtime/c/configure.ac +++ b/src/runtime/c/configure.ac @@ -1,5 +1,5 @@ -AC_INIT(Portable Grammar Format library, 0.1.pre, - https://code.google.com/p/grammatical-framework/, +AC_INIT(Portable Grammar Format library, 0.1-pre, + http://www.grammaticalframework.org/, libpgf) AC_PREREQ(2.58) From 1318a62da0fd0022969520ce55e9523394aaa1c5 Mon Sep 17 00:00:00 2001 From: Thomas Hallgren Date: Fri, 18 Aug 2017 11:54:13 +0200 Subject: [PATCH 3/4] Home page: update link to PGF library API (Haskell) to point to gf-3.9 in Hackage. --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 824dfe23a..d38227c1a 100644 --- a/index.html +++ b/index.html @@ -89,7 +89,7 @@ function sitesearch() {

    Develop Applications

      -
    • PGF library API (Haskell) +
    • PGF library API (Haskell)
    • PGF library API (Python)
    • PGF library API (Java)
    • PGF library API (.NET) From 0a0eaa01bcbe9574bb86a6470ca5139fbd32a9d3 Mon Sep 17 00:00:00 2001 From: Thomas Hallgren Date: Fri, 18 Aug 2017 11:55:44 +0200 Subject: [PATCH 4/4] 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. --- WebSetup.hs | 7 +++---- gf.cabal | 8 +++++--- src/compiler/GF/System/Catch.hs | 8 +------- src/compiler/GF/System/Concurrency.hs | 10 ++-------- src/runtime/haskell/PGF/Optimize.hs | 6 +----- 5 files changed, 12 insertions(+), 27 deletions(-) diff --git a/WebSetup.hs b/WebSetup.hs index 3e2e0832d..ee9f741d6 100644 --- a/WebSetup.hs +++ b/WebSetup.hs @@ -98,14 +98,13 @@ execute command args = showArg arg = if ' ' `elem` arg then "'" ++ arg ++ "'" else arg -- | This function is used to enable parallel compilation of the RGL and --- example grammars, but it is commented out by default --- to avoid casing problems for developers using Cabal<1.20 +-- example grammars numJobs flags = if null n then ["-j","+RTS","-A20M","-N","-RTS"] else ["-j="++n,"+RTS","-A20M","-N"++n,"-RTS"] where -- buildNumJobs is only available in Cabal>=1.20 - n = {-case buildNumJobs flags of + n = case buildNumJobs flags of Flag mn | mn/=Just 1-> maybe "" show mn - _ ->-} "" + _ -> "" diff --git a/gf.cabal b/gf.cabal index 38dc6ddb9..120b11b2f 100644 --- a/gf.cabal +++ b/gf.cabal @@ -1,7 +1,7 @@ name: gf -version: 3.9 +version: 3.9-git -cabal-version: >= 1.10 +cabal-version: >= 1.20 build-type: Custom license: OtherLicense license-file: LICENSE @@ -57,6 +57,7 @@ flag interrupt flag server Description: Include --server mode Default: True + flag network-uri description: Get Network.URI from the network-uri package default: True @@ -68,6 +69,7 @@ flag network-uri flag custom-binary Description: Use a customised version of the binary package Default: True + Manual: True flag c-runtime Description: Include functionality from the C run-time library (which must be installed already) @@ -75,7 +77,7 @@ flag c-runtime Library default-language: Haskell2010 - build-depends: base >= 4.5 && <5, + build-depends: base >= 4.6 && <5, array, containers, bytestring, diff --git a/src/compiler/GF/System/Catch.hs b/src/compiler/GF/System/Catch.hs index f69934af5..11fae1a7b 100644 --- a/src/compiler/GF/System/Catch.hs +++ b/src/compiler/GF/System/Catch.hs @@ -1,13 +1,7 @@ --- | Isolate backwards incompatible library changes to 'catch' and 'try' -{-# LANGUAGE CPP #-} +-- | Backwards compatible 'catch' and 'try' module GF.System.Catch where import qualified System.IO.Error as S -- ** Backwards compatible try and catch -#if MIN_VERSION_base(4,4,0) catch = S.catchIOError try = S.tryIOError -#else -catch = S.catch -try = S.try -#endif diff --git a/src/compiler/GF/System/Concurrency.hs b/src/compiler/GF/System/Concurrency.hs index 41f318c7a..514eab649 100644 --- a/src/compiler/GF/System/Concurrency.hs +++ b/src/compiler/GF/System/Concurrency.hs @@ -1,7 +1,6 @@ -{-# LANGUAGE CPP,ForeignFunctionInterface #-} +{-# LANGUAGE ForeignFunctionInterface #-} -- | A variant of 'Control.Concurrent.setNumCapabilities' that automatically --- detects the number of processors in the system, and is available --- even when compiling with GHC<7.6. +-- detects the number of processors in the system. module GF.System.Concurrency( -- * Controlling parallelism setNumCapabilities,getNumberOfProcessors) where @@ -16,13 +15,8 @@ import Foreign.C.Types(CInt(..)) -- hasn't already been set with @+RTS -N/n/ -RTS@. setNumCapabilities opt_n = do n <- maybe getNumberOfProcessors return opt_n -#if MIN_VERSION_base(4,6,0) C.setNumCapabilities n return True -#else - n_now <- C.getNumCapabilities - return (n==n_now) -#endif -- | Returns the number of processors in the system. getNumberOfProcessors = fmap fromEnum c_getNumberOfProcessors diff --git a/src/runtime/haskell/PGF/Optimize.hs b/src/runtime/haskell/PGF/Optimize.hs index 45b4311a5..8739c8665 100644 --- a/src/runtime/haskell/PGF/Optimize.hs +++ b/src/runtime/haskell/PGF/Optimize.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE CPP, BangPatterns #-} +{-# LANGUAGE BangPatterns #-} module PGF.Optimize ( optimizePGF , updateProductionIndices @@ -11,11 +11,7 @@ import PGF.Macros import Data.List (mapAccumL) import Data.Array.IArray import Data.Array.MArray -#if MIN_VERSION_base(4,6,0) import Data.Array.Unsafe as U(unsafeFreeze) -#else -import Data.Array.ST as U(unsafeFreeze) -#endif import Data.Array.ST import Data.Array.Unboxed import qualified Data.Map as Map