Merge pull request #161 from anka-213/indent-errors

Indent each line of error messages
This commit is contained in:
Inari Listenmaa
2023-09-25 17:29:50 +02:00
committed by GitHub
5 changed files with 12 additions and 11 deletions

View File

@@ -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: |

View File

@@ -14,8 +14,8 @@ jobs:
strategy:
matrix:
os:
- ubuntu-18.04
- ubuntu-20.04
- ubuntu-22.04
runs-on: ${{ matrix.os }}

View File

@@ -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

View File

@@ -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}

View File

@@ -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 ;