forked from GitHub/gf-core
Merge pull request #161 from anka-213/indent-errors
Indent each line of error messages
This commit is contained in:
3
.github/workflows/build-all-versions.yml
vendored
3
.github/workflows/build-all-versions.yml
vendored
@@ -95,8 +95,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
stack build --system-ghc --stack-yaml stack-ghc${{ matrix.ghc }}.yaml
|
stack build --test --no-run-tests --system-ghc --stack-yaml stack-ghc${{ matrix.ghc }}.yaml
|
||||||
# stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks
|
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
2
.github/workflows/build-binary-packages.yml
vendored
2
.github/workflows/build-binary-packages.yml
vendored
@@ -14,8 +14,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
os:
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
- ubuntu-20.04
|
||||||
|
- ubuntu-22.04
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
|||||||
6
.github/workflows/build-python-package.yml
vendored
6
.github/workflows/build-python-package.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-18.04, macos-10.15]
|
os: [ubuntu-latest, macos-latest]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
@@ -21,7 +21,7 @@ jobs:
|
|||||||
- uses: actions/setup-python@v1
|
- uses: actions/setup-python@v1
|
||||||
name: Install Python
|
name: Install Python
|
||||||
with:
|
with:
|
||||||
python-version: '3.7'
|
python-version: '3.x'
|
||||||
|
|
||||||
- name: Install cibuildwheel
|
- name: Install cibuildwheel
|
||||||
run: |
|
run: |
|
||||||
@@ -59,7 +59,7 @@ jobs:
|
|||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
name: Install Python
|
name: Install Python
|
||||||
with:
|
with:
|
||||||
python-version: '3.7'
|
python-version: '3.x'
|
||||||
|
|
||||||
- name: Build sdist
|
- name: Build sdist
|
||||||
run: cd src/runtime/python && python setup.py sdist
|
run: cd src/runtime/python && python setup.py sdist
|
||||||
|
|||||||
@@ -42,11 +42,12 @@ getSourceModule opts file0 =
|
|||||||
raw <- liftIO $ keepTemp tmp
|
raw <- liftIO $ keepTemp tmp
|
||||||
--ePutStrLn $ "1 "++file0
|
--ePutStrLn $ "1 "++file0
|
||||||
(optCoding,parsed) <- parseSource opts pModDef raw
|
(optCoding,parsed) <- parseSource opts pModDef raw
|
||||||
|
let indentLines = unlines . map (" "++) . lines
|
||||||
case parsed of
|
case parsed of
|
||||||
Left (Pn l c,msg) -> do file <- liftIO $ writeTemp tmp
|
Left (Pn l c,msg) -> do file <- liftIO $ writeTemp tmp
|
||||||
cwd <- getCurrentDirectory
|
cwd <- getCurrentDirectory
|
||||||
let location = makeRelative cwd file++":"++show l++":"++show c
|
let location = makeRelative cwd file++":"++show l++":"++show c
|
||||||
raise (location++":\n "++msg)
|
raise (location++":\n" ++ indentLines msg)
|
||||||
Right (i,mi0) ->
|
Right (i,mi0) ->
|
||||||
do liftIO $ removeTemp tmp
|
do liftIO $ removeTemp tmp
|
||||||
let mi =mi0 {mflags=mflags mi0 `addOptions` opts, msrc=file0}
|
let mi =mi0 {mflags=mflags mi0 `addOptions` opts, msrc=file0}
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
testsuite/compiler/update/ArrityCheck.gf:6:1:
|
testsuite/compiler/update/ArrityCheck.gf:6:1:
|
||||||
conflicting information in module ArrityCheck
|
conflicting information in module ArrityCheck
|
||||||
fun f : Int -> Int -> Int ;
|
fun f : Int -> Int -> Int ;
|
||||||
def f 0 = \x -> x ;
|
def f 0 = \x -> x ;
|
||||||
and
|
and
|
||||||
def f 1 1 = 0 ;
|
def f 1 1 = 0 ;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user