<p dir="ltr">Partially. Unfortunately, bidirectional pattern synonyms tie the types of the pattern synonyms to the types of the smart constructors for no good reason, making them (currently) inappropriate. But fixing that problem would offer one way to this optimization, I think.</p>
<div class="gmail_quote">On May 25, 2016 8:37 PM, "Carter Schonwald" <<a href="mailto:carter.schonwald@gmail.com">carter.schonwald@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">could this be simulated/modeled with pattern synonyms?</div><div class="gmail_extra"><br><div class="gmail_quote"><div class="quoted-text">On Wed, May 25, 2016 at 7:51 PM, David Feuer <span dir="ltr"><<a href="mailto:david.feuer@gmail.com" target="_blank">david.feuer@gmail.com</a>></span> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="quoted-text"><p dir="ltr">I've started a wiki page, <a href="https://ghc.haskell.org/trac/ghc/wiki/OptimizeCountingGADTs" target="_blank">https://ghc.haskell.org/trac/ghc/wiki/OptimizeCountingGADTs</a> , to consider optimizing GADTs that look like natural numbers but that possibly have "heavy zeros". Please take a look.</p>
<br></div>_______________________________________________<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><br></div>
</blockquote></div>