[GHC] #14218: GHC.Stack.HasCallStack not compatible with constraint synonyms (was: GHC.Stack.HasCallStack not compatible with ConstraintKinds)

GHC ghc-devs at haskell.org
Wed Sep 13 15:46:14 UTC 2017


#14218: GHC.Stack.HasCallStack not compatible with constraint synonyms
-------------------------------------+-------------------------------------
        Reporter:  ntc2              |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.1
      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 bgamari):

 * cc: gridaphobe, simonpj (added)


Comment:

 Hmm, yes, this is an unfortunate consequence of the implementation of the
 `HasCallStack` implementation. I suspect we find the `C` dictionary in
 scope when we solve for `callStack`'s constraints in `f`. Consequently we
 just pass it as a whole to `callStack` and the special callstack solver
 logic is never invoked. I honestly don't know how best to avoid this, but
 it certainly suggests that the status quo is rather fragile.

 I fear this issue may be somewhat intrinsic in the implementation
 strategy. If this is case we should at very least make sure this wrinkle
 is well-documented.

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


More information about the ghc-tickets mailing list