Specializing functions with implicit parameters
lexi.lambda at gmail.com
Sun Mar 15 02:47:00 UTC 2020
> On Mar 14, 2020, at 20:03, Sandy Maguire <sandy at sandymaguire.me> wrote:
> What GHC are you testing against? I suspect https://gitlab.haskell.org/ghc/ghc/merge_requests/668 <https://gitlab.haskell.org/ghc/ghc/merge_requests/668> will fix this.
I’ve tested against HEAD. I think the change you link is helpful, but it doesn’t quite get there: the usage gets dumped before specHeader even gets a chance to look at the call. The relevant bit of code is here:
Specifically, this line seals the deal:
ClassPred cls _ -> not (isIPClass cls) -- Superclasses can't be IPs
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ghc-devs