Skip to content

Commit

Permalink
Merge pull request #78 from anka-213/solve-syntax-error-bug
Browse files Browse the repository at this point in the history
Fix syntax error problem for older versions of GHC
  • Loading branch information
johnjcamilleri authored Oct 9, 2020
2 parents 670a58e + 7b4eeb3 commit db5ee0b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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

Expand Down
8 changes: 6 additions & 2 deletions src/compiler/GF/Grammar/Lexer.x
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ $u = [.\n] -- universal: any character

:-
"--" [.]* ; -- Toss single line comments
"{-" ([$u # \-] | \- [$u # \}])* ("-")+ "}" ;
"{-" ([$u # \-] | \- [$u # \}])* ("-")+ "}" ;

$white+ ;
@rsyms { tok ident }
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit db5ee0b

Please sign in to comment.