hssqlppp icon indicating copy to clipboard operation
hssqlppp copied to clipboard

Generic instances

Open jkarni opened this issue 9 years ago • 1 comments

I want to retrieve the list of types of Placeholders in a typechecked Statement. This would be significantly easier with a Generic instance for most datatypes.

I'm happy to send a PR with instances, though looking at the ag files has me a little confused: I'd have thought it to be just a question of adding deriving <Type>: <classes>, but it seems as though ScalarExpr has more instances than I can find in the source file.

jkarni avatar Dec 06 '16 18:12 jkarni

The instances are probably from this line which is using the uuagc syntax: deriving AllNodes: Show,Eq,Typeable,Data (hssqlppp/src/Database/HsSqlPpp/Internals/AstInternal.ag:1382)

AllNodes is defined just above this.

JakeWheat avatar Dec 07 '16 09:12 JakeWheat