Popularity
3.7
Declining
Activity
0.0
Stable
4
4
0

Monthly Downloads: 7
Programming language: Haskell
License: ISC License
Tags: Template Haskell     TH    
Latest version: v0.0.1.1

th-to-exp alternatives and similar packages

Based on the "th" category.
Alternatively, view th-to-exp alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of th-to-exp or a related project?

Add another 'th' Package

README

th-to-exp Build Status

th-to-exp is a package that provides a way to persist data from compile-time to runtime by producing Template Haskell expressions that evaluate to particular values. For example, if you have a value Just 1, then toExp (Just 1) will produce the expression [e| Just 1 |], which can be used in a splice. For a more direct example, here’s what that looks like without the quasiquote notation:

> toExp (Just 1)
AppE (ConE GHC.Base.Just) (LitE (IntegerL 1))

This is done by using a typeclass, ToExp, that can be automatically derived for types that have a Generic instance.