Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.API.TH
Description
This module defines some utilities for working with Template
Haskell, which may be useful for defining Tool
s, but should be
considered internal implementation details of this package.
Documentation
applicativeE :: ExpQ -> [ExpQ] -> ExpQ Source
Construct an idiomatic expression (an expression in an Applicative context), i.e.
app ke [] = ke app ke [e1,e2,...,en] = ke <$> e1 <*> e2 ... <*> en
optionalInstanceD :: ToolSettings -> Name -> [TypeQ] -> [DecQ] -> Q [Dec] Source
Add an instance declaration for a class, if such an instance does not already exist