summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInari Listenmaa <inari.listenmaa@gmail.com>2023-09-25 17:29:50 +0200
committerGitHub <noreply@github.com>2023-09-25 17:29:50 +0200
commit7d9015e2e159b376cf2ba8332093c9623375557e (patch)
tree808be3297a56011a967153c608a329db31c3d669
parent318b710a14e3bcbfb8386e4e357d4ed64b1a0ae1 (diff)
parentcf1ef40789fc6761e46ecac1215cdb018972f2ae (diff)
Merge pull request #161 from anka-213/indent-errors
Indent each line of error messages
-rw-r--r--.github/workflows/build-all-versions.yml3
-rw-r--r--.github/workflows/build-binary-packages.yml2
-rw-r--r--.github/workflows/build-python-package.yml6
-rw-r--r--src/compiler/GF/Compile/GetGrammar.hs3
-rw-r--r--testsuite/compiler/update/ArrityCheck.gfs.gold9
5 files changed, 12 insertions, 11 deletions
diff --git a/.github/workflows/build-all-versions.yml b/.github/workflows/build-all-versions.yml
index f6f1b82a7..2bd856b7c 100644
--- a/.github/workflows/build-all-versions.yml
+++ b/.github/workflows/build-all-versions.yml
@@ -95,8 +95,7 @@ jobs:
- name: Build
run: |
- stack build --system-ghc --stack-yaml stack-ghc${{ matrix.ghc }}.yaml
- # stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks
+ stack build --test --no-run-tests --system-ghc --stack-yaml stack-ghc${{ matrix.ghc }}.yaml
- name: Test
run: |
diff --git a/.github/workflows/build-binary-packages.yml b/.github/workflows/build-binary-packages.yml
index 493d5e774..d476aa161 100644
--- a/.github/workflows/build-binary-packages.yml
+++ b/.github/workflows/build-binary-packages.yml
@@ -14,8 +14,8 @@ jobs:
strategy:
matrix:
os:
- - ubuntu-18.04
- ubuntu-20.04
+ - ubuntu-22.04
runs-on: ${{ matrix.os }}
diff --git a/.github/workflows/build-python-package.yml b/.github/workflows/build-python-package.yml
index 67cbba6dd..5e484bdd0 100644
--- a/.github/workflows/build-python-package.yml
+++ b/.github/workflows/build-python-package.yml
@@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: true
matrix:
- os: [ubuntu-18.04, macos-10.15]
+ os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v1
@@ -21,7 +21,7 @@ jobs:
- uses: actions/setup-python@v1
name: Install Python
with:
- python-version: '3.7'
+ python-version: '3.x'
- name: Install cibuildwheel
run: |
@@ -59,7 +59,7 @@ jobs:
- uses: actions/setup-python@v2
name: Install Python
with:
- python-version: '3.7'
+ python-version: '3.x'
- name: Build sdist
run: cd src/runtime/python && python setup.py sdist
diff --git a/src/compiler/GF/Compile/GetGrammar.hs b/src/compiler/GF/Compile/GetGrammar.hs
index 191c3aff9..a7fd3de72 100644
--- a/src/compiler/GF/Compile/GetGrammar.hs
+++ b/src/compiler/GF/Compile/GetGrammar.hs
@@ -42,11 +42,12 @@ getSourceModule opts file0 =
raw <- liftIO $ keepTemp tmp
--ePutStrLn $ "1 "++file0
(optCoding,parsed) <- parseSource opts pModDef raw
+ let indentLines = unlines . map (" "++) . lines
case parsed of
Left (Pn l c,msg) -> do file <- liftIO $ writeTemp tmp
cwd <- getCurrentDirectory
let location = makeRelative cwd file++":"++show l++":"++show c
- raise (location++":\n "++msg)
+ raise (location++":\n" ++ indentLines msg)
Right (i,mi0) ->
do liftIO $ removeTemp tmp
let mi =mi0 {mflags=mflags mi0 `addOptions` opts, msrc=file0}
diff --git a/testsuite/compiler/update/ArrityCheck.gfs.gold b/testsuite/compiler/update/ArrityCheck.gfs.gold
index 7e0ff3d44..bfe3808ab 100644
--- a/testsuite/compiler/update/ArrityCheck.gfs.gold
+++ b/testsuite/compiler/update/ArrityCheck.gfs.gold
@@ -2,7 +2,8 @@
testsuite/compiler/update/ArrityCheck.gf:6:1:
conflicting information in module ArrityCheck
- fun f : Int -> Int -> Int ;
- def f 0 = \x -> x ;
-and
- def f 1 1 = 0 ;
+ fun f : Int -> Int -> Int ;
+ def f 0 = \x -> x ;
+ and
+ def f 1 1 = 0 ;
+