<div><div style="font-size:16px;color:rgb(49,49,49);word-spacing:1px" dir="auto"><div dir="auto" style="font-size:1rem">Phrased differently is a magic stand in for 0 ary sum and products ?</div></div><div dir="auto" style="font-size:16px;color:rgb(49,49,49);word-spacing:1px"><br></div><div dir="auto" style="font-size:1rem;color:rgb(49,49,49);word-spacing:1px">Or do you mean how n-ary sum and product are the same structure when n=1?</div></div><div dir="auto" style="font-size:1rem;color:rgb(49,49,49);word-spacing:1px"><br></div><div dir="auto" style="font-size:1rem;color:rgb(49,49,49);word-spacing:1px">Forgot to cc list. Pardon the double send :)</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 24, 2019 at 11:22 PM Richard Eisenberg <<a href="mailto:rae@richarde.dev">rae@richarde.dev</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I forget if I'm the contributor Ben mentions below, but regardless: NoExt is used in two separate ways within GHC. It's used both as the extension of a sum (new constructor) and the extension of a product (new field in a constructor). But the identity for sum is different than the identity for products. To me, it makes good sense for the NoExt used as a product extension (new field) to have the 1 trivial inhabitant (thus forming the identity for products), but the NoExt used as a sum extension (new constructor) to have 0 inhabitants (thus forming the identity for sums). Clearly, one of these will need a new name.<br>
<br>
Thanks,<br>
Richard<br>
<br>
> On Jun 24, 2019, at 4:57 PM, Ben Gamari <<a href="mailto:ben@smart-cactus.org" target="_blank">ben@smart-cactus.org</a>> wrote:<br>
> <br>
> Hi Shayan,<br>
> <br>
> During code review a contributor asked about a TTG extension point.<br>
> While answering his question I realized I didn't have a good explanation<br>
> for why NoExt is inhabited; as far as I can tell it should rather be<br>
> unhabited.<br>
> <br>
> If there is a reason for this then can you:<br>
> <br>
> 1. describe why this is so in #16863 [1]<br>
> 2. open an MR documenting the reason in Note [Trees that Grow].<br>
> <br>
> If not, perhaps we should consider changing it; the current state of<br>
> things is a bit awkward.<br>
> <br>
> Cheers,<br>
> <br>
> - Ben<br>
> <br>
> <br>
> [1] <a href="https://gitlab.haskell.org/ghc/ghc/issues/16863" rel="noreferrer" target="_blank">https://gitlab.haskell.org/ghc/ghc/issues/16863</a><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>
_______________________________________________<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>
</blockquote></div></div>