th-abstraction: A new library for inspecting datatypes from Template Haskell

Hello, I've uploaded a new library to Hackage that helps normalize the information one can get by reifying the type constructor of a type declared with data or newtype. https://hackage.haskell.org/package/th-abstraction https://github.com/glguy/th-abstraction I've found that I was duplicating a lot of code when trying to maintain compatibility across a range of Template Haskell versions when using the 'reify' operation. Currently I'm testing against GHC versions as old as 7.4.2 and as new as 8.2.1-rc1. This package eliminates some of the noise that comes from reify's syntax-oriented constructors and eliminates the differences across normal and GADT syntax. I expect to add more Template Haskell functionality to this package over time as needed with a focus on being able to maintain compatibility across a wide range of template-haskell package versions. I hope others are able to find it useful! Best regards, Eric Mertens "glguy"
participants (1)
-
Eric Mertens