[GHC] #14635: Double stacktrace with errorWithCallStack

#14635: Double stacktrace with errorWithCallStack -------------------------------------+------------------------------------- Reporter: flip101 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Documentation | Version: 8.2.2 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: -------------------------------------+------------------------------------- Hello, The documentation of https://hackage.haskell.org/package/base-4.10.0.0/docs/GHC- Stack.html#t:CallStack uses the following code: {{{#!hs errorWithCallStack :: HasCallStack => String -> a errorWithCallStack msg = error (msg ++ "n" ++ prettyCallStack callStack) }}} But this is confusing because now you will get two stacktraces. One from error and one inside error with prettyCallStack. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14635 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14635: Double stacktrace with errorWithCallStack -------------------------------------+------------------------------------- Reporter: flip101 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Documentation | Version: 8.2.2 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 flip101): Same code here https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14635#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14635: Double stacktrace with errorWithCallStack
-------------------------------------+-------------------------------------
Reporter: flip101 | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Documentation | Version: 8.2.2
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 Simon Peyton Jones

#14635: Double stacktrace with errorWithCallStack -------------------------------------+------------------------------------- Reporter: flip101 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Documentation | Version: 8.2.2 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 simonpj): The above commit just fixes the same problem in GHC's own source code. Could someone else fix the documentation in the two places identified above? Thanks! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14635#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14635: Double stacktrace with errorWithCallStack -------------------------------------+------------------------------------- Reporter: flip101 | Owner: alpmestan Type: bug | Status: new Priority: normal | Milestone: Component: Documentation | Version: 8.2.2 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 alpmestan): * owner: (none) => alpmestan -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14635#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14635: Double stacktrace with errorWithCallStack -------------------------------------+------------------------------------- Reporter: flip101 | Owner: alpmestan Type: bug | Status: patch Priority: normal | Milestone: Component: Documentation | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): D4317 Wiki Page: | -------------------------------------+------------------------------------- Changes (by alpmestan): * status: new => patch * differential: => D4317 Comment: I submitted a documentation patch for both sources on phabricator, see [https://phabricator.haskell.org/D4317 D4317]. If anyone's got any feedback, please leave a comment on that differential :) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14635#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14635: Double stacktrace with errorWithCallStack
-------------------------------------+-------------------------------------
Reporter: flip101 | Owner: alpmestan
Type: bug | Status: patch
Priority: normal | Milestone:
Component: Documentation | Version: 8.2.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): D4317
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#14635: Double stacktrace with errorWithCallStack -------------------------------------+------------------------------------- Reporter: flip101 | Owner: alpmestan Type: bug | Status: closed Priority: normal | Milestone: 8.4.1 Component: Documentation | Version: 8.2.2 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): D4317 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed * milestone: => 8.4.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14635#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC