diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2015-07-17 00:06:28 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2015-07-17 00:08:10 +0200 |
commit | a5e9da8feb5110ab8ee8fe3821e6b6d53946f983 (patch) | |
tree | ec6959c47ef3eb67bec380b09a9e661c51e82f79 /testsuite/tests/safeHaskell | |
parent | 2c9de9c9a3df8e855c883139b0cb2fd41801bd67 (diff) | |
download | haskell-a5e9da8feb5110ab8ee8fe3821e6b6d53946f983.tar.gz |
Fix off-by-one error in GHCi line reporting (Trac #10578)
Test Plan: I couldn't add tests because apparently line number
reporting was already working correctly when loading script files. I
don't know how to test by running commands using stdin, is this
supported?
Reviewers: austin, thomie, bgamari
Reviewed By: thomie, bgamari
Subscribers: hvr, thomie
Differential Revision: https://phabricator.haskell.org/D1067
Diffstat (limited to 'testsuite/tests/safeHaskell')
-rw-r--r-- | testsuite/tests/safeHaskell/ghci/p10.stderr | 2 | ||||
-rw-r--r-- | testsuite/tests/safeHaskell/ghci/p13.stderr | 4 | ||||
-rw-r--r-- | testsuite/tests/safeHaskell/ghci/p14.stderr | 2 | ||||
-rw-r--r-- | testsuite/tests/safeHaskell/ghci/p16.stderr | 8 | ||||
-rw-r--r-- | testsuite/tests/safeHaskell/ghci/p4.stderr | 6 | ||||
-rw-r--r-- | testsuite/tests/safeHaskell/ghci/p6.stderr | 6 | ||||
-rw-r--r-- | testsuite/tests/safeHaskell/ghci/p9.stderr | 2 |
7 files changed, 15 insertions, 15 deletions
diff --git a/testsuite/tests/safeHaskell/ghci/p10.stderr b/testsuite/tests/safeHaskell/ghci/p10.stderr index e20f84f241..5104dd6a96 100644 --- a/testsuite/tests/safeHaskell/ghci/p10.stderr +++ b/testsuite/tests/safeHaskell/ghci/p10.stderr @@ -1,2 +1,2 @@ -<interactive>:10:1: error: Variable not in scope: b
+<interactive>:9:1: error: Variable not in scope: b
diff --git a/testsuite/tests/safeHaskell/ghci/p13.stderr b/testsuite/tests/safeHaskell/ghci/p13.stderr index f7e8b8524b..7ba149a36b 100644 --- a/testsuite/tests/safeHaskell/ghci/p13.stderr +++ b/testsuite/tests/safeHaskell/ghci/p13.stderr @@ -1,10 +1,10 @@ -<interactive>:11:1: error: +<interactive>:10:1: error: Unsafe overlapping instances for Pos [Int] arising from a use of ‘res’ The matching instance is: instance [overlapping] [safe] Pos [Int] - -- Defined at <interactive>:9:30 + -- Defined at <interactive>:8:30 It is compiled in a Safe module and as such can only overlap instances from the same module, however it overlaps the following instances from different modules: diff --git a/testsuite/tests/safeHaskell/ghci/p14.stderr b/testsuite/tests/safeHaskell/ghci/p14.stderr index 4d0b14e970..b015016622 100644 --- a/testsuite/tests/safeHaskell/ghci/p14.stderr +++ b/testsuite/tests/safeHaskell/ghci/p14.stderr @@ -1,2 +1,2 @@ -<interactive>:10:1: parse error on input ‘{-# RULES’ +<interactive>:9:1: parse error on input ‘{-# RULES’ diff --git a/testsuite/tests/safeHaskell/ghci/p16.stderr b/testsuite/tests/safeHaskell/ghci/p16.stderr index 9540119eae..e14727bc49 100644 --- a/testsuite/tests/safeHaskell/ghci/p16.stderr +++ b/testsuite/tests/safeHaskell/ghci/p16.stderr @@ -2,14 +2,14 @@ <no location info>: warning:
-XGeneralizedNewtypeDeriving is not allowed in Safe Haskell; ignoring -XGeneralizedNewtypeDeriving
-<interactive>:16:29: error:
+<interactive>:15:29: error:
Can't make a derived instance of ‘Op T2’:
‘Op’ is not a derivable class
Try GeneralizedNewtypeDeriving for GHC's newtype-deriving extension
In the newtype declaration for ‘T2’
-<interactive>:19:9: error:
+<interactive>:18:9: error:
Data constructor not in scope: T2 :: T -> t
- Perhaps you meant ‘T1’ (line 13)
+ Perhaps you meant ‘T1’ (line 12)
-<interactive>:22:4: error: Variable not in scope: y
+<interactive>:21:4: error: Variable not in scope: y
diff --git a/testsuite/tests/safeHaskell/ghci/p4.stderr b/testsuite/tests/safeHaskell/ghci/p4.stderr index 2160c00d7d..5d70969f3a 100644 --- a/testsuite/tests/safeHaskell/ghci/p4.stderr +++ b/testsuite/tests/safeHaskell/ghci/p4.stderr @@ -1,8 +1,8 @@ -<interactive>:6:9: error:
+<interactive>:5:9: error:
Not in scope: ‘System.IO.Unsafe.unsafePerformIO’
-<interactive>:7:9: error:
+<interactive>:6:9: error:
Variable not in scope: x :: IO Integer -> t
-<interactive>:8:1: error: Variable not in scope: y
+<interactive>:7:1: error: Variable not in scope: y
diff --git a/testsuite/tests/safeHaskell/ghci/p6.stderr b/testsuite/tests/safeHaskell/ghci/p6.stderr index 83343029d4..8cca54eb2f 100644 --- a/testsuite/tests/safeHaskell/ghci/p6.stderr +++ b/testsuite/tests/safeHaskell/ghci/p6.stderr @@ -1,10 +1,10 @@ -<interactive>:12:1: error:
+<interactive>:11:1: error:
Unacceptable result type in foreign declaration:
Safe Haskell is on, all FFI imports must be in the IO monad
When checking declaration:
foreign import ccall safe "static sin" c_sin :: Double -> Double
-<interactive>:13:1: error:
+<interactive>:12:1: error:
Variable not in scope: c_sin :: Integer -> t
- Perhaps you meant ‘c_sin'’ (line 8)
+ Perhaps you meant ‘c_sin'’ (line 7)
diff --git a/testsuite/tests/safeHaskell/ghci/p9.stderr b/testsuite/tests/safeHaskell/ghci/p9.stderr index e20f84f241..5104dd6a96 100644 --- a/testsuite/tests/safeHaskell/ghci/p9.stderr +++ b/testsuite/tests/safeHaskell/ghci/p9.stderr @@ -1,2 +1,2 @@ -<interactive>:10:1: error: Variable not in scope: b
+<interactive>:9:1: error: Variable not in scope: b
|