<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On Mar 14, 2020, at 20:03, Sandy Maguire <<a href="mailto:sandy@sandymaguire.me" class="">sandy@sandymaguire.me</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">What GHC are you testing against? I suspect <a href="https://gitlab.haskell.org/ghc/ghc/merge_requests/668" class="">https://gitlab.haskell.org/ghc/ghc/merge_requests/668</a> will fix this.<br class=""></div></div></blockquote></div><br class=""><div class="">I’ve tested against HEAD. I think the change you link is helpful, but it doesn’t <i class="">quite</i> get there: the usage gets dumped before specHeader even gets a chance to look at the call. The relevant bit of code is here:</div><div class=""><br class=""></div><div class=""><a href="https://gitlab.haskell.org/ghc/ghc/blob/1de3ab4a147eeb0b34b24a3c0e91f174e6e5cb79/compiler/specialise/Specialise.hs#L2274-2302" class="">https://gitlab.haskell.org/ghc/ghc/blob/1de3ab4a147eeb0b34b24a3c0e91f174e6e5cb79/compiler/specialise/Specialise.hs#L2274-2302</a></div><div class=""><br class=""></div><div class="">Specifically, this line seals the deal:</div><div class=""><br class=""></div><div class="">    ClassPred cls _ -> not (isIPClass cls)  -- Superclasses can't be IPs</div><div class=""><br class=""></div><div class="">So maybe the right fix is just to change the role of type_determines_value so that it turns SpecDicts into UnspecArgs, and then with your change everything would just happily work out.</div></body></html>