
Re "the second bullet point under Implementation Details", I now understand. Good point. The issue is this: {{{ f :: (?loc :: CallStack) => IO () f = print (?location :: CallStack) }}} There are two alternatives for what to pass to `print`: * Pass the call site of `print`, pushed onto the passed-in call stack * Pass a singleton stack, just the call site of `print`, reflecting
#9049: Expose srcLoc from the assertion architecture to allow better error messages -------------------------------------+------------------------------------- Reporter: nh2 | Owner: gridaphobe Type: feature request | Status: patch Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: Phab:D578 -------------------------------------+------------------------------------- Comment (by gridaphobe): Replying to [comment:26 simonpj]: the change in name.
You have implemented the first, but I think the latter would perhaps be more intuitive. Does anyone else have opinions?
The more I think about this, the more inclined I am to go with the latter behavior as well. The former, while useful, is just a bit strange. Also, from a maintainability perspective, it would probably be easier to switch from the 2nd to the 1st behavior, if needed, than vice-versa (since the 1st should allow strictly more programs to type-check). But I'd also like to hear from others. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9049#comment:30 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler