Whoops, I replied via email instead of commenting on the ticket. I've done so now. Sorry for the mailing list noise.<br><br><div class="gmail_quote"><div dir="ltr">On Mon, Jun 11, 2018, 08:21 Nicolas Frisby <<a href="mailto:nicolas.frisby@gmail.com">nicolas.frisby@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">That way of saying it clarifies the expectations for me. And doesn't seem too burdensome for the plugin author.<div><br></div><div>Thus I think this ticket could be resolved by updating the documentation. (Though I still would like for a plugin to be able to request the flattened Wanteds. Separate ticket?)</div><div><br></div><div>In particular this sentence in the User Guide</div><div><br></div><div>"[The plugin] will be invoked at two points in the constraint solving process: after simplification of given constraints, and after unflattening of wanted constraints."</div><div><br></div><div>would benefit from some elaboration. Specifically, "unflattening of wanted constraints" is somewhat ambiguous: until you spelled it out, I was thinking that if a constraint is flattened, it doesn't have any flattening variables in it. However, I'm inferring here that the jargon is used to mean that "unflattening a wanted constraint" only eliminates fmvs, possibly leaving fsks behind? That's what I've been confused about (until now, I think). Thanks.</div><div><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Jun 5, 2018, 01:48 GHC <<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">#15147: Type checker plugin receives Wanteds that are not completely unflattened<br>
-------------------------------------+-------------------------------------<br>
        Reporter:  nfrisby           |                Owner:  (none)<br>
            Type:  bug               |               Status:  new<br>
        Priority:  normal            |            Milestone:  8.6.1<br>
       Component:  Compiler (Type    |              Version:  8.4.1<br>
  checker)                           |             Keywords:<br>
      Resolution:                    |  TypeCheckerPlugins<br>
Operating System:  Unknown/Multiple  |         Architecture:<br>
                                     |  Unknown/Multiple<br>
 Type of failure:  None/Unknown      |            Test Case:<br>
      Blocked By:                    |             Blocking:<br>
 Related Tickets:                    |  Differential Rev(s):<br>
       Wiki Page:                    |<br>
-------------------------------------+-------------------------------------<br>
<br>
Comment (by simonpj):<br>
<br>
 > Perhaps I'm misunderstanding something<br>
<br>
 I didn't express it very clearly.  As it stands, the Given CFunEqCan's<br>
 remain, and hence so do the fsks.  The Wanted CFunEqCans are removed<br>
 (currently) along with the fmvs.<br>
<br>
 So yes, currently Wanteds can contain fsks, whose definition is given by a<br>
 CFunEqCan.  I would have thought that most plugins would not find it hard<br>
 to deal with that.<br>
<br>
-- <br>
Ticket URL: <<a href="http://ghc.haskell.org/trac/ghc/ticket/15147#comment:14" rel="noreferrer" target="_blank">http://ghc.haskell.org/trac/ghc/ticket/15147#comment:14</a>><br>
GHC <<a href="http://www.haskell.org/ghc/" rel="noreferrer" target="_blank">http://www.haskell.org/ghc/</a>><br>
The Glasgow Haskell Compiler<br>
</blockquote></div></div></blockquote></div>