
#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