Changelog for template-haskell-2.15.0.0
Changelog for template-haskell
package
2.15.0.0 *May 2019
-
In
Language.Haskell.TH.Syntax
,DataInstD
,NewTypeInstD
,TySynEqn
, andRuleP
now all have aMaybe [TyVarBndr]
argument, which contains a list of quantified type variables if an explicitforall
is present, andNothing
otherwise.DataInstD
,NewTypeInstD
,TySynEqn
also now use a singleType
argument to represent the left-hand-side to avoid malformed type family equations and allow visible kind application.Correspondingly, in
Language.Haskell.TH.Lib.Internal
,pragRuleD
,dataInstD
,newtypeInstD
, andtySynEqn
now all have aMaybe [TyVarBndrQ]
argument. Non-API-breaking versions of these functions can be found inLanguage.Haskell.TH.Lib
. The type signature oftySynEqn
has also changed from[TypeQ] -> TypeQ -> TySynEqnQ
to(Maybe [TyVarBndrQ]) -> TypeQ -> TypeQ -> TySynEqnQ
, for the same reason as inLanguage.Haskell.TH.Syntax
above. Consequently,tySynInstD
also changes fromName -> TySynEqnQ -> DecQ
toTySynEqnQ -> DecQ
. -
Add
Lift
instances forNonEmpty
andVoid
-
addForeignFilePath
now support assembler sources (#16180).
2.14.0.0 *September 2018
-
Introduce an
addForeignFilePath
function, as well as a correspondingqAddForeignFile
class method toQuasi
. UnlikeaddForeignFile
, which takes the contents of the file as an argument,addForeignFilePath
takes as an argument a path pointing to a foreign file. A newaddForeignSource
function has also been added which takes a file's contents as an argument.The old
addForeignFile
function is now deprecated in favor ofaddForeignSource
, and theqAddForeignFile
method ofQuasi
has been removed entirely. -
Introduce an
addTempFile
function, as well as a correspondingqAddTempFile
method toQuasi
, which requests a temporary file of a given suffix. -
Add a
ViaStrategy
constructor toDerivStrategy
. -
Add support for
-XImplicitParams
viaImplicitParamT
,ImplicitParamVarE
, andImplicitParamBindD
. -
Add support for
-XRecursiveDo
viaMDoE
andRecS
.
2.13.0.0 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
. -
Add
KindQ
,TyVarBndrQ
, andFamilyResultSigQ
aliases toLanguage.Haskell.TH.Lib
. -
Add
Language.Haskell.TH.Lib.Internal
module, 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. -
MonadIO
is now a superclass ofQuasi
,qRunIO
has a default implementationqRunIO = liftIO
-
Add
MonadIO Q
instance
2.12.0.0 July 2017
-
Bundled with GHC 8.2.1
-
Add support for pattern synonyms. This introduces one new constructor to
Info
(PatSynI
), two new constructors toDec
(PatSynD
andPatSynSigD
), and two new data types (PatSynDir
andPatSynArgs
), among other changes. (#8761) -
Add support for unboxed sums. (#12478)
-
Add support for visible type applications. (#12530)
-
Add support for attaching deriving strategies to
deriving
statements (#10598) -
Add support for
COMPLETE
pragmas. (#13098) -
unboxedTupleTypeName
andunboxedTupleDataName
now work for unboxed 0-tuples and 1-tuples (#12977) -
Language.Haskell.TH
now reexports all ofLanguage.Haskell.TH.Lib
. (#12992). This causesLanguage.Haskell.TH
to export more types and functions that it did before:TExp
,BangQ
, andFieldExpQ
unboxedTupP
,unboxedTupE
andunboundVarE
infixLD
,infixRD
, andinfixND
unboxedTupleT
andwildCardT
plainTV
andkindedTV
interruptible
andfunDep
valueAnnotation
,typeAnnotation
, andmoduleAnnotation
-
Add support for overloaded labels.
2.11.0.0 May 2016
-
Bundled with GHC 8.0.1
-
The compiler can now resolve infix operator fixities in types on its own. The
UInfixT
constructor ofType
is analoguous toUInfixE
for expressions and can contain a tree of infix type applications which will be reassociated according to the fixities of the operators. TheParensT
constructor can be used to explicitly group expressions. -
Add
namePackage
andnameSpace
-
Make
dataToQa
anddataToExpQ
able to handleData
instances whosetoConstr
implementation relies on a function instead of a data constructor (#10796) -
Add
Show
instances forNameFlavour
andNameSpace
-
Remove
FamilyD
andFamFlavour
. AddDataFamilyD
andOpenTypeFamilyD
as the representation of data families and open type families respectively. (#6018) -
Add
TypeFamilyHead
for common elements ofOpenTypeFamilyD
andClosedTypeFamilyD
(#10902) -
The
Strict
datatype was split among different datatypes: three for writing the strictness information of data constructors' fields as denoted in Haskell source code (SourceUnpackedness
andSourceStrictness
, as well asBang
), and one for strictness information after a constructor is compiled (DecidedStrictness
).Strict
,StrictType
andVarStrictType
have been deprecated in favor ofBang
,BangType
andVarBangType
. (#10697) -
Add
reifyConStrictness
to query a data constructor'sDecidedStrictness
values for its fields (#10697) -
The
ClassOpI
,DataConI
, andVarI
constructors no longer have aFixity
field. Instead, allFixity
information for a givenName
is now determined through thereifyFixity
function, which returnsJust
the fixity if there is an explicit fixity declaration for thatName
, andNothing
otherwise (#10704 and #11345) -
Add
MonadFail Q
instance for GHC 8.0 and later (#11661) -
Add support for OVERLAP(S/PED/PING) pragmas on instances
2.10.0.0 Mar 2015
- Bundled with GHC 7.10.1
- Remove build-dependency on
containers
package - Make
Pred
a type synonym ofType
, and deprecateclassP
/equalP
(#7021) - Add support for
LINE
pragma viaprageLineD
andLineP
- Replace
Int#
with!Int
inNameFlavour
constructors - Derive
Generic
for TH types (#9527) - Add
standaloneDerivD
(#8100) - Add support for generic default signatures via
defaultSigD
(#9064) - Add
Lift
instances for()
andRational
- Derive new
Show
andData
instances forLoc
- Derive
Eq
instances forLoc
,Info
, andModuleInfo
- Make calling conventions available in template haskell consistent with those from GHC (#9703)
- Add support for
-XStaticValues
viastaticE
- Add
Ord
instances to TH types - Merge some instances from
th-orphans
(Ppr
instances forLit
andLoc
as well asLift
instances for numeric types - Put parens around
(ty :: kind)
when pretty-printing TH syntax