logo
首页技术栈工具库讨论
th-to-exp

th-to-exp

This package 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: This is done by using a typeclass, ToExp, that can be automatically derived for types that have a Generic instance.
由 
bruceshi2021-01-13 收录
--
推荐
不推荐
更多信息
HACKAGE
carbal install th-to-exp
查看
标签
根据用户添加的标签生成
暂无标签