
Cafe, How can I provide a Data instance for a GADT? I am trying to TH on it, and Uniplate requires Data. I tried StandaloneDeriving, but it seems not to work. Best, -- Ozgur Akgun

answering to myself: I guess this is related:
http://hackage.haskell.org/trac/ghc/ticket/3497
On 14 April 2010 10:13, Ozgur Akgun
Cafe,
How can I provide a Data instance for a GADT? I am trying to TH on it, and Uniplate requires Data. I tried StandaloneDeriving, but it seems not to work.
Best,
-- Ozgur Akgun
-- Ozgur Akgun

Seeing this old thread[1], I hope something happened towards enabling this.
Does anybody know the current status about using TH on GADTs?
[1]
http://www.haskell.org/pipermail/template-haskell/2006-August/000567.html
On 14 April 2010 10:32, Ozgur Akgun
answering to myself: I guess this is related: http://hackage.haskell.org/trac/ghc/ticket/3497
On 14 April 2010 10:13, Ozgur Akgun
wrote: Cafe,
How can I provide a Data instance for a GADT? I am trying to TH on it, and Uniplate requires Data. I tried StandaloneDeriving, but it seems not to work.
Best,
-- Ozgur Akgun
-- Ozgur Akgun
-- Ozgur Akgun

Hi Ozgur,
At least template-haskell-2.4.0.0 (which comes with GHC 6.12) has syntax for
type equality constraints [1], so I'm guessing it should support GADTs (I
haven't actually tested it). It also has syntax for type families.
Cheers,
Pedro
[1]
http://hackage.haskell.org/packages/archive/template-haskell/2.4.0.0/doc/htm...
On Wed, Apr 14, 2010 at 11:53, Ozgur Akgun
Seeing this old thread[1], I hope something happened towards enabling this. Does anybody know the current status about using TH on GADTs?
[1] http://www.haskell.org/pipermail/template-haskell/2006-August/000567.html
On 14 April 2010 10:32, Ozgur Akgun
wrote: answering to myself: I guess this is related: http://hackage.haskell.org/trac/ghc/ticket/3497
On 14 April 2010 10:13, Ozgur Akgun
wrote: Cafe,
How can I provide a Data instance for a GADT? I am trying to TH on it, and Uniplate requires Data. I tried StandaloneDeriving, but it seems not to work.
Best,
-- Ozgur Akgun
-- Ozgur Akgun
-- Ozgur Akgun
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

There have been a couple of emails about Template Haskell support for
· GADTs
· View patterns
· Reifying instances
There’s a ticket for this already http://hackage.haskell.org/trac/ghc/ticket/3497
It’s mainly a library design question, in this case the design of the Template Haskell data types in Language.Haskell.TH.Syntax. It needs some motivated person to propose a design, get a consensus, and write some boilerplate code. Just use the standard libraries process
An issue is the extent to which it’s ok to change the Template Haskell data types (and thereby break people’s code), but that’s something the interested parties can work out together.
If you evolve a consensus design I’m more than happy to make it part of GHC. I just don’t want to drive the consensus building!
Simon
From: haskell-cafe-bounces@haskell.org [mailto:haskell-cafe-bounces@haskell.org] On Behalf Of Ozgur Akgun
Sent: 14 April 2010 10:53
To: Haskell cafe
Subject: [Haskell-cafe] Re: Data instance for a GADT
Seeing this old thread[1], I hope something happened towards enabling this.
Does anybody know the current status about using TH on GADTs?
[1] http://www.haskell.org/pipermail/template-haskell/2006-August/000567.html
On 14 April 2010 10:32, Ozgur Akgun
participants (3)
-
José Pedro Magalhães
-
Ozgur Akgun
-
Simon Peyton-Jones