Re: instances for closed type families

2016-05-25 Thread Alan & Kim Zimmerman
Ryan The discussion was in this thread [1], but went off list at some point. The relevant part of the off-list discussion, quoting Philip Hölzenspies is "UndecidableInstances comes from having to constrain the type that the PostTcType-family projects to, besides the arguments of the AST-types;

Optimizing "counting" GADTs

2016-05-25 Thread David Feuer
I've started a wiki page, https://ghc.haskell.org/trac/ghc/wiki/OptimizeCountingGADTs , to consider optimizing GADTs that look like natural numbers but that possibly have "heavy zeros". Please take a look. ___ ghc-devs mailing list ghc-devs@haskell.org

Re: Optimizing "counting" GADTs

2016-05-25 Thread David Feuer
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. On May 25, 2016 8:37 PM,

Re: Unpacking single-field, single-strict-constructor GADTs and existentials

2016-05-25 Thread David Feuer
#1965 *as modified by comments #7 and #9* is pretty much what I'm hoping for. On Wed, May 25, 2016 at 3:27 AM, Simon Peyton Jones wrote: > I'm not following the details of this discussion. Would it be possible to > write a compact summary, with the key examples, in the

Re: Unpacking single-field, single-strict-constructor GADTs and existentials

2016-05-25 Thread David Feuer
I've started a wiki page at https://ghc.haskell.org/trac/ghc/wiki/NewtypeOptimizationForGADTS On Wed, May 25, 2016 at 3:27 AM, Simon Peyton Jones wrote: > I'm not following the details of this discussion. Would it be possible to > write a compact summary, with the key