[GHC] #10578: ghci line numbers are off by one

#10578: ghci line numbers are off by one -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: low | Milestone: Component: GHCi | Version: 7.10.1 Keywords: newcomer | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- {{{ rwbarton@morphism:/tmp$ ghci-7.10.1 GHCi, version 7.10.1: http://www.haskell.org/ghc/ :? for help Prelude> 3 : 'a' <interactive>:2:5: Couldn't match expected type ‘[a]’ with actual type ‘Char’ Relevant bindings include it :: [a] (bound at <interactive>:2:1) In the second argument of ‘(:)’, namely ‘'a'’ In the expression: 3 : 'a' In an equation for ‘it’: it = 3 : 'a' Prelude> 3 : 'a' <interactive>:3:5: Couldn't match expected type ‘[a]’ with actual type ‘Char’ Relevant bindings include it :: [a] (bound at <interactive>:3:1) In the second argument of ‘(:)’, namely ‘'a'’ In the expression: 3 : 'a' In an equation for ‘it’: it = 3 : 'a' Prelude> }}} Why are the errors reported as being on lines 2 and 3? And no, I don't buy that line 1 was the GHCi welcome message :) Apparently it's been like this since at least GHC 7.4 and I've never noticed. `ghc -e cmd1 -e cmd2` reports every command as beginning on a new line 1, which is also weird. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10578 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10578: ghci line numbers are off by one -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: low | Milestone: Component: GHCi | Version: 7.10.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by hvr): Try {{{ :set prompt "\955:%l> " :set prompt2 "\955:%l| " }}} :-) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10578#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10578: ghci line numbers are off by one -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: osa1 Type: bug | Status: new Priority: low | Milestone: Component: GHCi | Version: 7.10.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: D1067 -------------------------------------+------------------------------------- Changes (by osa1): * owner: => osa1 * differential: => D1067 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10578#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10578: ghci line numbers are off by one -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: osa1 Type: bug | Status: new Priority: low | Milestone: Component: GHCi | Version: 7.10.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: D1067 -------------------------------------+------------------------------------- Comment (by osa1): This bug should be there for a long time. We have at least 34 GHCi tests with wrong location reporting, e.g. test.run.stderr locations are different than test.stderr for those tests. I fixed this bug in my patch and now I'm going over GHCi tests and fixing expected outputs. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10578#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10578: ghci line numbers are off by one
-------------------------------------+-------------------------------------
Reporter: rwbarton | Owner: osa1
Type: bug | Status: new
Priority: low | Milestone:
Component: GHCi | Version: 7.10.1
Resolution: | Keywords: newcomer
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions: D1067
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#10578: ghci line numbers are off by one -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: osa1 Type: bug | Status: new Priority: low | Milestone: 7.12.1 Component: GHCi | Version: 7.10.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: D1067 -------------------------------------+------------------------------------- Changes (by hvr): * milestone: => 7.12.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10578#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10578: ghci line numbers are off by one -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: osa1 Type: bug | Status: closed Priority: low | Milestone: 7.12.1 Component: GHCi | Version: 7.10.1 Resolution: fixed | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: D1067 -------------------------------------+------------------------------------- Changes (by rwbarton): * status: new => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10578#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC