Support library for Template Haskell
|Version on this page:||126.96.36.199|
|LTS Haskell 20.23:||188.8.131.52|
|Stackage Nightly 2023-05-31:||184.108.40.206|
|Latest on Hackage:||220.127.116.11|
Module documentation for 18.104.22.168
This package provides modules containing facilities for manipulating Haskell source code using Template Haskell.
See http://www.haskell.org/haskellwiki/Template_Haskell for more information.
22.214.171.124 *May 2019
RulePnow all have a
Maybe [TyVarBndr]argument, which contains a list of quantified type variables if an explicit
forallis present, and
TySynEqnalso now use a single
Typeargument to represent the left-hand-side to avoid malformed type family equations and allow visible kind application.
tySynEqnnow all have a
Maybe [TyVarBndrQ]argument. Non-API-breaking versions of these functions can be found in
Language.Haskell.TH.Lib. The type signature of
tySynEqnhas also changed from
[TypeQ] -> TypeQ -> TySynEqnQto
(Maybe [TyVarBndrQ]) -> TypeQ -> TypeQ -> TySynEqnQ, for the same reason as in
tySynInstDalso changes from
Name -> TySynEqnQ -> DecQto
TySynEqnQ -> DecQ.
addForeignFilePathnow support assembler sources (#16180).
126.96.36.199 *September 2018
addForeignFilePathfunction, as well as a corresponding
qAddForeignFileclass method to
addForeignFile, which takes the contents of the file as an argument,
addForeignFilePathtakes as an argument a path pointing to a foreign file. A new
addForeignSourcefunction has also been added which takes a file’s contents as an argument.
addForeignFilefunction is now deprecated in favor of
addForeignSource, and the
Quasihas been removed entirely.
addTempFilefunction, as well as a corresponding
Quasi, which requests a temporary file of a given suffix.
Add support for
Add support for
188.8.131.52 March 2018
Bundled with GHC 8.4.1
Language.Haskell.TH.FamFlavour, which was deprecated in 2.11, has been removed.
Add support for overloaded labels. Introduces
labelE :: String -> ExpQ.
Language.Haskell.TH.Lib.Internalmodule, which exposes some additional functionality that is used internally in GHC’s integration with Template Haskell. This is not a part of the public API, and as such, there are no API guarantees for this module from version to version.
MonadIOis now a superclass of
qRunIOhas a default implementation
qRunIO = liftIO
184.108.40.206 July 2017
Bundled with GHC 8.2.1
Add support for pattern synonyms. This introduces one new constructor to
PatSynI), two new constructors to
PatSynSigD), and two new data types (
PatSynArgs), among other changes. (#8761)
Add support for unboxed sums. (#12478)
Add support for visible type applications. (#12530)
Add support for attaching deriving strategies to
Add support for
unboxedTupleDataNamenow work for unboxed 0-tuples and 1-tuples (#12977)
Language.Haskell.THnow reexports all of
Language.Haskell.TH.Lib. (#12992). This causes
Language.Haskell.THto export more types and functions that it did before:
Add support for overloaded labels.
220.127.116.11 May 2016
Bundled with GHC 8.0.1
The compiler can now resolve infix operator fixities in types on its own. The
Typeis analoguous to
UInfixEfor expressions and can contain a tree of infix type applications which will be reassociated according to the fixities of the operators. The
ParensTconstructor can be used to explicitly group expressions.
dataToExpQable to handle
toConstrimplementation relies on a function instead of a data constructor (#10796)
OpenTypeFamilyDas the representation of data families and open type families respectively. (#6018)
TypeFamilyHeadfor common elements of
Strictdatatype was split among different datatypes: three for writing the strictness information of data constructors’ fields as denoted in Haskell source code (
SourceStrictness, as well as
Bang), and one for strictness information after a constructor is compiled (
VarStrictTypehave been deprecated in favor of
reifyConStrictnessto query a data constructor’s
DecidedStrictnessvalues for its fields (#10697)
VarIconstructors no longer have a
Fixityfield. Instead, all
Fixityinformation for a given
Nameis now determined through the
reifyFixityfunction, which returns
Justthe fixity if there is an explicit fixity declaration for that
Nothingotherwise (#10704 and #11345)
MonadFail Qinstance for GHC 8.0 and later (#11661)
Add support for OVERLAP(S/PED/PING) pragmas on instances
18.104.22.168 Mar 2015
- Bundled with GHC 7.10.1
- Remove build-dependency on
Preda type synonym of
Type, and deprecate
- Add support for
Genericfor TH types (#9527)
- Add support for generic default signatures via
- Derive new
- Make calling conventions available in template haskell consistent with those from GHC (#9703)
- Add support for
Ordinstances to TH types
- Merge some instances from
Locas well as
Liftinstances for numeric types
- Put parens around
(ty :: kind)when pretty-printing TH syntax