[GHC] #11510: Missing Show instance for GHC.Stack.SrcLoc
#11510: Missing Show instance for GHC.Stack.SrcLoc -------------------------------------+------------------------------------- Reporter: SimonHengel | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1-rc1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- With GHC 7.10.2 the Show instance was still present and for me it's somewhat inconvenient not to have one. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11510> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11510: Missing Show instance for GHC.Stack.SrcLoc -------------------------------------+------------------------------------- Reporter: SimonHengel | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.1 Component: Core Libraries | Version: 8.0.1-rc1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * priority: normal => high * cc: gridaphobe, ekmett (added) * component: Compiler => Core Libraries * milestone: => 8.0.1 Comment: We should really make sure something happens on this before 8.0.1. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11510#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11510: Missing Show instance for GHC.Stack.SrcLoc -------------------------------------+------------------------------------- Reporter: SimonHengel | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.1 Component: Core Libraries | Version: 8.0.1-rc1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by gridaphobe): I don't have a problem with adding the Show instance for SrcLoc back, I didn't think it would be very useful. There was also a Show instance for CallStack in 7.10.2, is there a reason to want that? I think not, because the user shouldn't care about the representation. If you want a machine-readable formatting of a CallStack you can use `getCallStack stk` to get a list of the call-sites, which is then Showable (assuming a Show SrcLoc instance). -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11510#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11510: Missing Show instance for GHC.Stack.SrcLoc -------------------------------------+------------------------------------- Reporter: SimonHengel | Owner: Type: bug | Status: patch Priority: high | Milestone: 8.0.1 Component: Core Libraries | Version: 8.0.1-rc1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1886 Wiki Page: | -------------------------------------+------------------------------------- Changes (by gridaphobe): * status: new => patch * differential: => Phab:D1886 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11510#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11510: Missing Show instance for GHC.Stack.SrcLoc -------------------------------------+------------------------------------- Reporter: SimonHengel | Owner: Type: bug | Status: patch Priority: high | Milestone: 8.0.1 Component: Core Libraries | Version: 8.0.1-rc1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1886 Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari):
There was also a Show instance for CallStack in 7.10.2, is there a reason to want that? I think not, because the user shouldn't care about the representation. If you want a machine-readable formatting of a CallStack you can use getCallStack stk to get a list of the call-sites, which is then Showable (assuming a Show SrcLoc instance).
I see the argument here but then again I think there is little harm in providing the instance. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11510#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11510: Missing Show instance for GHC.Stack.SrcLoc -------------------------------------+------------------------------------- Reporter: SimonHengel | Owner: Type: bug | Status: patch Priority: high | Milestone: 8.0.1 Component: Core Libraries | Version: 8.0.1-rc1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1886 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"38af3d1db2889423a12a2232b9d52181bba23d75/ghc" 38af3d1/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="38af3d1db2889423a12a2232b9d52181bba23d75" Add a derived `Show SrcLoc` instance Test Plan: ``` ghci> import GHC.Stack ghci> SrcLoc "f" "b" "c" 1 2 3 4 SrcLoc {srcLocPackage = "f", srcLocModule = "b", srcLocFile = "c", srcLocStartLine = 1, srcLocStartCol = 2, srcLocEndLine = 3, srcLocEndCol = 4} ``` Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: thomie Projects: #ghc Differential Revision: https://phabricator.haskell.org/D1886 GHC Trac Issues: #11510 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11510#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11510: Missing Show instance for GHC.Stack.SrcLoc -------------------------------------+------------------------------------- Reporter: SimonHengel | Owner: Type: bug | Status: merge Priority: high | Milestone: 8.0.1 Component: Core Libraries | Version: 8.0.1-rc1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1886 Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * status: patch => merge -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11510#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11510: Missing Show instance for GHC.Stack.SrcLoc -------------------------------------+------------------------------------- Reporter: SimonHengel | Owner: Type: bug | Status: closed Priority: high | Milestone: 8.0.1 Component: Core Libraries | Version: 8.0.1-rc1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1886 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed Comment: This was merged to `ghc-8.0` as bffb7afbde197763b5897b16efb02f5ec4833828. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11510#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC