Improve error locations
This commit is contained in:
4
tests/BadImport.newt
Normal file
4
tests/BadImport.newt
Normal file
@@ -0,0 +1,4 @@
|
||||
module BadImport
|
||||
|
||||
-- Error should point to name here
|
||||
import Does.Not.Exist
|
||||
2
tests/BadImport.newt.fail
Normal file
2
tests/BadImport.newt.fail
Normal file
@@ -0,0 +1,2 @@
|
||||
*** Process tests/BadImport.newt
|
||||
ERROR at tests/BadImport.newt:4:8--4:22: error reading tests/Does/Not/Exist.newt: Error: ENOENT: no such file or directory, open 'tests/Does/Not/Exist.newt'
|
||||
9
tests/ErrorDup.newt
Normal file
9
tests/ErrorDup.newt
Normal file
@@ -0,0 +1,9 @@
|
||||
module ErrorDup
|
||||
|
||||
data Nat = Z | S Nat
|
||||
|
||||
data Nat = Z | S Nat
|
||||
|
||||
record Nat where
|
||||
|
||||
class Nat where
|
||||
21
tests/ErrorDup.newt.fail
Normal file
21
tests/ErrorDup.newt.fail
Normal file
@@ -0,0 +1,21 @@
|
||||
*** Process tests/ErrorDup.newt
|
||||
module ErrorDup
|
||||
ERROR at tests/ErrorDup.newt:5:6--5:9: Nat already declared
|
||||
data Nat = Z | S Nat
|
||||
|
||||
data Nat = Z | S Nat
|
||||
^^^
|
||||
|
||||
ERROR at tests/ErrorDup.newt:7:8--7:11: Nat already declared
|
||||
data Nat = Z | S Nat
|
||||
|
||||
record Nat where
|
||||
^^^
|
||||
|
||||
ERROR at tests/ErrorDup.newt:9:7--9:10: Nat already declared
|
||||
record Nat where
|
||||
|
||||
class Nat where
|
||||
^^^
|
||||
|
||||
Compile failed
|
||||
Reference in New Issue
Block a user