<div dir="ltr">Hello,<div><br></div><div>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.</div><div><br></div><div><a href="https://hackage.haskell.org/package/th-abstraction">https://hackage.haskell.org/package/th-abstraction</a></div><div><a href="https://github.com/glguy/th-abstraction">https://github.com/glguy/th-abstraction</a></div><div><br></div><div>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.</div><div><br></div><div>This package eliminates some of the noise that comes from reify's syntax-oriented constructors and eliminates the differences across normal and GADT syntax.</div><div><br></div><div>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.</div><div><br></div><div>I hope others are able to find it useful!</div><div><br></div><div>Best regards,</div><div>Eric Mertens</div><div>"glguy"</div></div>