mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-22 01:22:51 -06:00
Merge pull request #78 from anka-213/solve-syntax-error-bug
Fix syntax error problem for older versions of GHC
This commit is contained in:
4
.github/workflows/build-python-package.yml
vendored
4
.github/workflows/build-python-package.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Install cibuildwheel
|
- name: Install cibuildwheel
|
||||||
run: |
|
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
|
- name: Install build tools for OSX
|
||||||
if: startsWith(matrix.os, 'macos')
|
if: startsWith(matrix.os, 'macos')
|
||||||
@@ -69,7 +69,7 @@ jobs:
|
|||||||
needs: [build_wheels, build_sdist]
|
needs: [build_wheels, build_sdist]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
|
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ $u = [.\n] -- universal: any character
|
|||||||
|
|
||||||
:-
|
:-
|
||||||
"--" [.]* ; -- Toss single line comments
|
"--" [.]* ; -- Toss single line comments
|
||||||
"{-" ([$u # \-] | \- [$u # \}])* ("-")+ "}" ;
|
"{-" ([$u # \-] | \- [$u # \}])* ("-")+ "}" ;
|
||||||
|
|
||||||
$white+ ;
|
$white+ ;
|
||||||
@rsyms { tok ident }
|
@rsyms { tok ident }
|
||||||
@@ -138,7 +138,7 @@ data Token
|
|||||||
|
|
||||||
res = eitherResIdent
|
res = eitherResIdent
|
||||||
eitherResIdent :: (Ident -> Token) -> Ident -> Token
|
eitherResIdent :: (Ident -> Token) -> Ident -> Token
|
||||||
eitherResIdent tv s =
|
eitherResIdent tv s =
|
||||||
case Map.lookup s resWords of
|
case Map.lookup s resWords of
|
||||||
Just t -> t
|
Just t -> t
|
||||||
Nothing -> tv s
|
Nothing -> tv s
|
||||||
@@ -285,6 +285,10 @@ instance Monad P where
|
|||||||
POk s a -> unP (k a) s
|
POk s a -> unP (k a) s
|
||||||
PFailed posn err -> PFailed posn err
|
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
|
instance Fail.MonadFail P where
|
||||||
fail msg = P $ \(_,AI posn _ _) -> PFailed posn msg
|
fail msg = P $ \(_,AI posn _ _) -> PFailed posn msg
|
||||||
|
|||||||
Reference in New Issue
Block a user