On October 20, 2014 at 2:35:27 PM, Richard Eisenberg (e...@cis.upenn.edu) wrote:
> Having done so, I'm not 100% convinced that this is the right thing to do. I 
> would love feedback  
> on my full, concrete proposal available at 
> https://ghc.haskell.org/trac/ghc/wiki/Design/TemplateHaskellGADTs  
>  
> Is this a change for the better or worse? Feel free either to comment on the 
> wiki page or  
> to this email.
>  
> Thanks!
> Richard

As I understand it, the big downsides are that we don’t get `gunfold` for Dec 
and Pragma, and we may not get `Generic` instances for them at all.

At first this felt pretty bad, but then I reviewed how generics and TH tend to 
get used together, and now I’m not _quite_ as anxious. In my mind the main use 
case for them is in things like this: 
http://www.well-typed.com/blog/2014/10/quasi-quoting-dsls/ — skimming the code 
involved, and the way `dataToExpQ` and friends tend to work, the key bit is 
having the generic instances on what we’re inducting on, not what we’re 
building… By the time we hit concrete TH syntax, it feels a bit late to be 
doing further generic transformations on it, so I have a suspicion this won’t 
hit anyone. I certainly don’t think it’ll affect _my_ uses of TH at least :-)

Cheers,
Gershom
_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs

Reply via email to