<div dir="ltr">Thank you Matthew! I very much appreciate this kind of feedback.<div><br></div><div>1) I've updated the (bulk of the) wiki page to match the github repo just now. In particular, the "Elm" example lives here <a href="https://github.com/nfrisby/coxswain/blob/master/sculls/Elm.hs">https://github.com/nfrisby/coxswain/blob/master/sculls/Elm.hs</a>, so I just copied its most recent version onto the wiki. (The delta was the "off-by-one" `Short` constraints, right?)</div><div><br></div><div>2) I absolutely agree about -dcore-lint. I wrongly had it in my head that I needed a DEBUG build. See <a href="https://github.com/nfrisby/coxswain/issues/3#issuecomment-330266479">https://github.com/nfrisby/coxswain/issues/3#issuecomment-330266479</a></div><div><br></div><div>3) Awesome! I'll add a link to the README.</div><div><br></div><div>Thanks again. -Nick</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Sep 18, 2017 at 4:11 AM Matthew Pickering <<a href="mailto:matthewtpickering@gmail.com">matthewtpickering@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Nicolas, I briefly tried out the plugin this morning and have a few comments.<br>
<br>
1. The example file on the wiki page fails to compile. I needed to<br>
modify two of the constraints on `getName` and `getPos` to get it to<br>
work.<br>
<br>
2. I was inspecting how well the compiler optimises your<br>
representation and came across from very strange core that I didn't<br>
understand.<br>
<br>
<a href="https://gist.github.com/mpickering/6ec5501400e103d64284701d7537f223" rel="noreferrer" target="_blank">https://gist.github.com/mpickering/6ec5501400e103d64284701d7537f223</a><br>
<br>
Notice how there is a case on a lambda which binds an unused kind<br>
variable. But I can't understand how this works at all as I can't see<br>
where the lambda is applied.<br>
<br>
3. Running -dcore-lint on the example file quickly complains.  I think<br>
making sure that core-lint passes can be quite an important sanity<br>
check, is a fundamental reason which makes core lint work poorly with<br>
type checker plugins? If there is then we should perhaps fix this.<br>
<br>
I also packaged up the project for nix if that is useful to anyone else.<br>
<br>
<a href="https://gist.github.com/2a4b2fa25351bd900052d955a00ace6a" rel="noreferrer" target="_blank">https://gist.github.com/2a4b2fa25351bd900052d955a00ace6a</a><br>
<br>
Matt<br>
<br>
On Sat, Sep 16, 2017 at 11:00 PM, Nicolas Frisby<br>
<<a href="mailto:nicolas.frisby@gmail.com" target="_blank">nicolas.frisby@gmail.com</a>> wrote:<br>
> If you'd like to see how exactly the plugin manipulates constraints, I<br>
> suggest using the `summarize` and `trace` options that are discussed here:<br>
><br>
> <a href="https://ghc.haskell.org/trac/ghc/wiki/Plugins/TypeChecker/RowTypes/Coxswain#PluginDebugOptions" rel="noreferrer" target="_blank">https://ghc.haskell.org/trac/ghc/wiki/Plugins/TypeChecker/RowTypes/Coxswain#PluginDebugOptions</a><br>
><br>
> Also, the `sculls/Examples.hs` and `sculls/Elm.hs` files contain my only<br>
> test cases involving records and variants. Also see `coxswain/test/README`.<br>
><br>
> I'm kind of spent from rushing towards this "release", so I might be a bit<br>
> less productive for a while. But I'll be generally responsive about it if<br>
> others are spending time on it.<br>
><br>
> In particular: any advice for how to share the generated Haddock<br>
> documentation without uploading to Hackage/Stackage?<br>
><br>
> And thanks to all for responding to my questions. I'll have to think harder<br>
> about the answers given. At least for Derived constraints, in particular, I<br>
> still don't think we have all of the relevant information in one place. For<br>
> example, I recalling thinking that I was seeing some Derived constraints<br>
> that seemed to arise from the unifier "giving up" on a complicated equality<br>
> and emitting a Given equality instead, and nobody mentioned that in their<br>
> answers here. I'll try to suss out a repro of that exactly.<br>
><br>
> Thanks. -Nick<br>
><br>
> On Sat, Sep 16, 2017 at 2:27 PM Nicolas Frisby <<a href="mailto:nicolas.frisby@gmail.com" target="_blank">nicolas.frisby@gmail.com</a>><br>
> wrote:<br>
>><br>
>> I've uploaded the code to GitHub.<br>
>><br>
>> <a href="https://github.com/nfrisby/coxswain" rel="noreferrer" target="_blank">https://github.com/nfrisby/coxswain</a><br>
>><br>
>> I went with a BSD3 licence.<br>
>><br>
>> It's still very much a work in progress, so I only recommend using it for<br>
>> experimentation for now.<br>
>><br>
>> Thanks. -Nick<br>
>><br>
>><br>
>> On Sun, Sep 10, 2017 at 3:24 PM Nicolas Frisby <<a href="mailto:nicolas.frisby@gmail.com" target="_blank">nicolas.frisby@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> Hi all. I've been spending my free time for the last couple months on a<br>
>>> type checker plugin for row types. The free time waxes and wanes; sending an<br>
>>> email like this one was my primary goal for the past couple weeks.<br>
>>><br>
>>> At the very least, I hoped this project would let me finally get some<br>
>>> hands on experience with OutsideIn. And I definitely have. But I've also<br>
>>> made more progress than I anticipated, and I think the plugin is starting to<br>
>>> have legs!<br>
>>><br>
>>> I haven't uploaded the code yet to github -- it's not quite ready to<br>
>>> share. But I did do a write up on the dev wiki.<br>
>>><br>
>>><br>
>>> <a href="https://ghc.haskell.org/trac/ghc/wiki/Plugins/TypeChecker/RowTypes/Coxswain" rel="noreferrer" target="_blank">https://ghc.haskell.org/trac/ghc/wiki/Plugins/TypeChecker/RowTypes/Coxswain</a><br>
>>><br>
>>> I would really appreciate and questions, comments, and --- boy, oh boy<br>
>>> --- answers.<br>
>>><br>
>>> I hope to upload within a week or so, and I'll update that wiki page and<br>
>>> reply to this email when I do.<br>
>>><br>
>>> Thanks very much. -Nick<br>
>>><br>
>>> P.S. -- I've CC'd and BCC'd people who I anticipate would be specifically<br>
>>> interested in this (e.g. plugins, row types, etc). Please feel free to<br>
>>> forward to others that come to mind; I know some inboxes abjectly can't<br>
>>> afford default list traffic.<br>
>>><br>
>>> P.P.S. -- One hold up for the upload is: which license? I intend to<br>
>>> release under BSD3, mainly to match GHC since one ideal scenario would<br>
>>> involve being packaged with/integrated into GHC. But my brief recent<br>
>>> research suggests that the Apache license might be more conducive to<br>
>>> eventual widespread adoption. If you'd be willing to advise or even just<br>
>>> refer me to other write ups, please feel free to email me directly or to<br>
>>> start a separate thread on a more appropriate distribution list (CC'ing me,<br>
>>> please). Thanks again.<br>
><br>
><br>
> _______________________________________________<br>
> ghc-devs mailing list<br>
> <a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
><br>
</blockquote></div>