Commit a5e9da8f authored by Ömer Sinan Ağacan's avatar Ömer Sinan Ağacan Committed by Ben Gamari
Browse files

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
parent 2c9de9c9
<interactive>:10:1: error: Variable not in scope: b
<interactive>:9:1: error: Variable not in scope: b
<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:
......
<interactive>:10:1: parse error on input ‘{-# RULES’
<interactive>:9:1: parse error on input ‘{-# RULES’
......@@ -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
<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
<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)
<interactive>:10:1: error: Variable not in scope: b
<interactive>:9:1: error: Variable not in scope: b
<interactive>:4:9: Warning:
<interactive>:3:9: Warning:
Couldn't match type ‘[Dec]’ with ‘Exp’
Expected type: Q Exp
Actual type: DecsQ
......@@ -8,7 +8,7 @@
<interactive>:1:1:
Exception when trying to run compile-time code:
<interactive>:4:9:
<interactive>:3:9:
Couldn't match type ‘[Dec]’ with ‘Exp’
Expected type: Q Exp
Actual type: DecsQ
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment