[GHC] #11298: Implicit call stack empty in instance declarations

GHC ghc-devs at haskell.org
Tue Apr 5 15:17:12 UTC 2016


#11298: Implicit call stack empty in instance declarations
-------------------------------------+-------------------------------------
        Reporter:  pikajude          |                Owner:
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  7.11
      Resolution:  fixed             |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect result  |  Unknown/Multiple
  at runtime                         |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by gridaphobe):

 FYI, we removed the inference of CallStacks so the resolution is that all
 of these examples should produce an empty CallStack. Adding an explicit
 signature, eg

 {{{
 fooHelper :: ?loc :: CallStack => String
 fooHelper = prettyCallStack ?loc

 instance Foo () where
     foo () = fooHelper
 }}}

 will produce a singleton CallStack with the call-site of `fooHelper`
 inside `foo`.

 (Also, we're hiding the Implicit Parameter now and may move to a custom
 CallStack constraint in the future, so I'd suggest using the new
 `HasCallStack` synonym)

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11298#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list