From f2e4b89a22a1c7c7304e3a712e47e6d9f3f763e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=A4llberg?= Date: Thu, 8 Oct 2020 17:41:44 +0200 Subject: [PATCH 1/2] Fix syntax error problem for older versions of GHC --- src/compiler/GF/Grammar/Lexer.x | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/compiler/GF/Grammar/Lexer.x b/src/compiler/GF/Grammar/Lexer.x index fe455c58a..bde0aa064 100644 --- a/src/compiler/GF/Grammar/Lexer.x +++ b/src/compiler/GF/Grammar/Lexer.x @@ -35,7 +35,7 @@ $u = [.\n] -- universal: any character :- "--" [.]* ; -- Toss single line comments -"{-" ([$u # \-] | \- [$u # \}])* ("-")+ "}" ; +"{-" ([$u # \-] | \- [$u # \}])* ("-")+ "}" ; $white+ ; @rsyms { tok ident } @@ -138,7 +138,7 @@ data Token res = eitherResIdent eitherResIdent :: (Ident -> Token) -> Ident -> Token -eitherResIdent tv s = +eitherResIdent tv s = case Map.lookup s resWords of Just t -> t Nothing -> tv s @@ -285,6 +285,10 @@ instance Monad P where POk s a -> unP (k a) s PFailed posn err -> PFailed posn err +#if !(MIN_VERSION_base(4,13,0)) + -- Monad(fail) will be removed in GHC 8.8+ + fail = Fail.fail +#endif instance Fail.MonadFail P where fail msg = P $ \(_,AI posn _ _) -> PFailed posn msg From 7b4eeb368ceaa89bdd23500822e72f1a908cffb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=A4llberg?= Date: Thu, 8 Oct 2020 21:50:12 +0200 Subject: [PATCH 2/2] Make CI green See https://github.com/joerick/cibuildwheel/issues/446 --- .github/workflows/build-python-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-python-package.yml b/.github/workflows/build-python-package.yml index 45e94b853..921da9fb5 100644 --- a/.github/workflows/build-python-package.yml +++ b/.github/workflows/build-python-package.yml @@ -21,7 +21,7 @@ jobs: - name: Install cibuildwheel run: | - python -m pip install cibuildwheel==1.4.2 + python -m pip install git+https://github.com/joerick/cibuildwheel.git@master - name: Install build tools for OSX if: startsWith(matrix.os, 'macos') @@ -69,7 +69,7 @@ jobs: needs: [build_wheels, build_sdist] runs-on: ubuntu-latest if: github.ref == 'refs/heads/master' && github.event_name == 'push' - + steps: - uses: actions/checkout@v2