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

Eric Mertens emertens at gmail.com
Fri Apr 28 23:52:51 UTC 2017


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"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20170428/9dcf65c6/attachment.html>


More information about the Haskell-Cafe mailing list