
#5273: error and undefined should print a location -------------------------------------+------------------------------------ Reporter: augustss | Owner: Type: feature request | Status: new Priority: low | Milestone: 7.6.2 Component: Compiler | Version: 7.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by MikolajKonarski): * difficulty: => Unknown Comment: While we are at it, adding source position information to Debug.trace & Co would be very useful too (how often did you write 'trace "1" ... trace "2"', etc.?). This is done (in a hacky way, by passing assert as an argument) in the package loch from 2007, together with hacks for 'error' and exceptions. BTW, some support for locations in exceptions, without the need to profile for stack traces, would be very valuable too. Perhaps something can be done cheaply? Even just one random location sometimes? This is all needed by people for years, because at least 3 packages contain relevant basic hacks (in addition to other stuff): http://hackage.haskell.org/package/loch http://hackage.haskell.org/package/assert-failure http://hackage.haskell.org/package/assert plus there are some more that use TH for that. *shudder* Thank you in advance! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/5273#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler