Re: [Template-haskell] Lift instances of the AST-related types
This recent haskell-cafe thread[1] provides a way to implicity give
support for automatic derivation of Lift in GHC.
Since Data can be derived automatically and there's a way to lift any
"Data a => a" it's like having
automatic derivation for lift.
It's not a substitute of Ian's package (the instace Data a => Lift a
is illegal), but it complements it.
What do you think about including a function like "liftData :: Data a
=> a -> ExpQ" in the library?
On 11/2/07, Alfonso Acosta
On 11/2/07, Simon Peyton-Jones
wrote: It'd be good to check that the Haddock docs for TH.Lift are in good shape.
Well, right now they are inexistent but the library is tiny, that shouldn't be a problem.
I'll leave this up to you two to finalise.
Let's see what Ian thinks
(In fact it'd be great if you could improve the Haddock docs for the other TH modules. They are currently laughably bad. And you are clearly an expert!)
I cannot agree more, when I began to use TH I was forced (and I keep doing it) to look at the source comments to check what the AST-types meant.
I cannot promess anything for the short-term, but I'll try to send a documentation patch at some point.
Forgot to include the link to the aforementioned thread. [1] http://www.haskell.org/pipermail/haskell-cafe/2007-November/033955.html
On Sat, Nov 03, 2007 at 04:47:48PM +0100, Alfonso Acosta wrote:
It's not a substitute of Ian's package (the instace Data a => Lift a is illegal), but it complements it.
You can have that instance with undecidable and overlapping instances, can't you? Or is there another problem I'm missing? Thanks Ian
participants (2)
-
Alfonso Acosta -
Ian Lynagh