<div dir="ltr">I like functional dependencies but I don't think they should be on by default.  My main reason is that I don't know what's a good way to check FD consistency:  I find the original FD consistency check to be a bit too conservative, and the liberal coverage condition turned out to be unsound (e.g. See Tom Schrijvers's paper about FDs).   I guess in part for such reasons GHC has been very conservative about how it uses them (e.g., it won't use them on given constraints).  This has led to a bunch of confusion about what *is* a FD at all...  So I don't think their design/implementation is in its final form, which is why I don't think the extension should be on by default.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 4, 2020 at 6:29 AM Simon Peyton Jones via ghc-steering-committee <<a href="mailto:ghc-steering-committee@haskell.org">ghc-steering-committee@haskell.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-GB" style="overflow-wrap: break-word;">
<div class="gmail-m_6061083933703858646WordSection1">
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6pt;margin-left:36pt">
Can you elaborate? I don't understand where you are coming from yet.<u></u><u></u></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>In haste,<u></u><u></u></span></p>
<ul style="margin-top:0cm" type="disc">
<li class="gmail-m_6061083933703858646MsoListParagraph" style="margin-left:0cm"><span><a href="https://gitlab.haskell.org/ghc/ghc/-/issues?label_name=FunctionalDependencies" target="_blank">Many open tickets about fundeps</a>… still open because
 of lack of agreement about what the Right Thing is, not because the implementation is difficult<u></u><u></u></span></li><li class="gmail-m_6061083933703858646MsoListParagraph" style="margin-left:0cm"><span>As originally proposed they are quite restrictive (the Coverage Condition).  Many uses of fundeps use a more liberal coverage condition, currently
 enabled by UndecidableInstances.  I’m not sure if “Many” means “most” or just “a minority”; data needed.<u></u><u></u></span></li><li class="gmail-m_6061083933703858646MsoListParagraph" style="margin-left:0cm"><span>Fundeps affect unification in type inference, and have no effect in Givens, unlike type families. Nothing inherently wrong with that, but it
 feels unsatisfying that we can know that t1~t2 (from a fundep between two givens) but can’t exploit that fact.<u></u><u></u></span></li></ul>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>They are undoubtedly useful. I’m not arguing for removal.  They have just never felt as solid to me as other parts of our type system.<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>Simon<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<div style="border-top:none;border-right:none;border-bottom:none;border-left:1.5pt solid blue;padding:0cm 0cm 0cm 4pt">
<div>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> Spiwack, Arnaud <<a href="mailto:arnaud.spiwack@tweag.io" target="_blank">arnaud.spiwack@tweag.io</a>>
<br>
<b>Sent:</b> 04 December 2020 14:13<br>
<b>To:</b> Simon Peyton Jones <<a href="mailto:simonpj@microsoft.com" target="_blank">simonpj@microsoft.com</a>><br>
<b>Cc:</b> GHC Steering Committee <<a href="mailto:ghc-steering-committee@haskell.org" target="_blank">ghc-steering-committee@haskell.org</a>><br>
<b>Subject:</b> Re: [ghc-steering-committee] #380 GHC2021: What's wrong with Functional dependencies<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6pt;margin-left:0cm">
On Fri, Dec 4, 2020 at 3:07 PM Simon Peyton Jones <<a href="mailto:simonpj@microsoft.com" target="_blank">simonpj@microsoft.com</a>> wrote:<u></u><u></u></p>
<div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6pt;margin-left:0cm">
But fundeps – because they don’t carry evidence, as they stand – feel less solidly rooted.<u></u><u></u></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6pt;margin-left:0cm">
<u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6pt;margin-left:0cm">
Can you elaborate? I don't understand where you are coming from yet.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6pt;margin-left:0cm">
<u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6pt;margin-left:0cm">
(for the record: I'm not applying just “guarded by their own syntax” as a criterion, for me, this criterion is a sufficient condition for “no surprising new errors”. I also believe (believed?) that functional dependencies were quite standard and expected them
 to be here forever. I took TypeFamilyDependency to be a mild extension. I'm perfectly willing to be convinced otherwise.)<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>

_______________________________________________<br>
ghc-steering-committee mailing list<br>
<a href="mailto:ghc-steering-committee@haskell.org" target="_blank">ghc-steering-committee@haskell.org</a><br>
<a href="https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee" rel="noreferrer" target="_blank">https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee</a><br>
</blockquote></div>