Support library for Template Haskell

Version on this page:
LTS Haskell 8.3:
Stackage Nightly 2017-02-26:
Latest on Hackage:

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.


Changelog for template-haskell package Jan 2017

  • Bundled with GHC 8.0.2

  • Fix pretty-printing of list comprehensions with only one statement. Previously this was rendered as [Foo|] instead of Foo]. May 2016

  • Bundled with GHC 8.0.1

  • The compiler can now resolve infix operator fixities in types on its own. The UInfixT constructor of Type is analoguous to UInfixE for expressions and can contain a tree of infix type applications which will be reassociated according to the fixities of the operators. The ParensT constructor can be used to explicitly group expressions.

  • Add namePackage and nameSpace

  • Make dataToQa and dataToExpQ able to handle Data instances whose toConstr implementation relies on a function instead of a data constructor (#10796)

  • Add Show instances for NameFlavour and NameSpace

  • Remove FamilyD and FamFlavour. Add DataFamilyD and OpenTypeFamilyD as the representation of data families and open type families respectively. (#6018)

  • Add TypeFamilyHead for common elements of OpenTypeFamilyD and ClosedTypeFamilyD (#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 and SourceStrictness, as well as Bang), and one for strictness information after a constructor is compiled (DecidedStrictness). Strict, StrictType and VarStrictType have been deprecated in favor of Bang, BangType and VarBangType, and three functions (isStrict, isLazy, and unpack) were removed because they no longer serve any use in this new design. (#10697)

  • Add reifyConStrictness to query a data constructor's DecidedStrictness values for its fields (#10697)

  • The ClassOpI, DataConI, and VarI constructors no longer have a Fixity field. Instead, all Fixity information for a given Name is now determined through the reifyFixity function, which returns Just the fixity if there is an explicit fixity declaration for that Name, and Nothing otherwise (#10704 and #11345)

  • Add MonadFail Q instance for GHC 8.0 and later (#11661)

  • TODO: document API changes and important bugfixes

  • Add support for OVERLAP(S/PED/PING) pragmas on instances Mar 2015

  • Bundled with GHC 7.10.1
  • Remove build-dependency on containers package
  • Make Pred a type synonym of Type, and deprecate classP/equalP (#7021)
  • Add support for LINE pragma via prageLineD and LineP
  • Replace Int# with !Int in NameFlavour constructors
  • Derive Generic for TH types (#9527)
  • Add standaloneDerivD (#8100)
  • Add support for generic default signatures via defaultSigD (#9064)
  • Add Lift instances for () and Rational
  • Derive new Show and Data instances for Loc
  • Derive Eq instances for Loc, Info, and ModuleInfo
  • Make calling conventions available in template haskell consistent with those from GHC (#9703)
  • Add support for -XStaticValues via staticE
  • Add Ord instances to TH types
  • Merge some instances from th-orphans (Ppr instances for Lit and Loc as well as Lift instances for numeric types
  • Put parens around (ty :: kind) when pretty-printing TH syntax
Depends on:
Used by 946 packages:
ADPfusion, ActionKid, Agata, Agda, Allure, AspectAG, AutoForms, BNFC-meta, BiGUL, BitSyntax, Bravo, CCA, CLASE, Cartesian, ChristmasTree, ConfigFileTH, Contract, CurryDB, DSH, DisTract, Eq, FComp, Facts, FenwickTree, FermatsLastMargin, FerryCore, FixedPoint-simple, FloatingHex, ForSyDe, FormalGrammars, Frames, GTALib, GenussFold, GrammarProducts, Grempa, HAppS-Data, HAppS-IxSet, HAppS-Server, HAppS-State, HAppS-Util, HHDL, HLearn-algebra, HLearn-distributions, HList, HROOT, HROOT-core, HROOT-graf, HROOT-hist, HROOT-io, HROOT-math, HROOT-tree, HStringTemplate, HXQ, HaPy, HaTeX-qq, HarmTrace, Hawk, HerbiePlugin, Hoed, HsHTSLib, ImperativeHaskell, Interpolation, Interpolation-maxs, JYU-Utils, LambdaHack, LambdaPrettyQuote, LslPlus, Lykah, MagicHaskeller, MetaHDBC, MissingK, MonadLab, NoSlow, Nomyx-Core, Object, OrPatterns, PartialTypeSignatures, Piso, Printf-TH, QuasiText, Quelea, QuickCheck, QuickPlot, RepLib, Rlang-QQ, SFML-control, SciFlow, SimpleLog, SpacePrivateers, Strafunski-Sdf2Haskell, SybWidget, SyntaxMacros, Sysmon, THEff, TYB, TableAlgebra, TrieMap, URLT, Webrexp, Win32-errors, WordAlignment, Yablog, accelerate, accelerate-cuda, acid-state, acme-numbersystem, adaptive-tuple, aeson, aeson-extra, aeson-qq, aeson-schema, aeson-smart, air-th, airbrake, alex-meta, alex-tools, algebra-dag, algebra-sql, algebraic-classes, alms, amazonka-test, anonymous-sums, antiquoter, antisplice, api-field-json-th, api-tools, apiary, apis, applicative-quoters, applicative-splice, arx, atomo, atp-haskell, audiovisual, authoring, avers, aws-ec2, aws-sdk, aws-sdk-text-converter, axiomatic-classes, barrier, battleships, beam-th, bed-and-breakfast, berp, bff, bidirectionalization-combined, bifunctors, binary-file, binary-literal-qq, bindings-GLFW, boomerang, bound, brick, bson-mapping, cabal-dev, cabal-file-th, cabal-helper, cabal-query, caffegraph, cake3, call, call-haskell-from-anything, canteven-http, canteven-log, canteven-template, catamorphism, ceilometer-common, cgen, chatty, chell, chunks, cielo, clang-pure, clash, clash-lib, clash-prelude, classyplate, clckwrks-plugin-page, cluss, cmdargs, codec, codo-notation, cognimeta-utils, combinator-interactive, combobuffer, command-qq, compdata, compdata-param, complex-generic, compstrat, comptrans, computational-algebra, concatenative, configifier, container, context-free-grammar, contravariant-extras, control-invariants, convert, convertible-text, corebot-bliki, cplusplus-th, cql, craft, cryptol, cublas, cuda, d-bus, damnpacket, data-accessor-template, data-dword, data-filepath, data-flags, data-lens-light, data-lens-template, data-sword, dbmigrations, dbus-qq, dbus-th, dbus-th-introspection, dead-simple-json, debian, deepseq-th, dense, dependent-sum-template, derive, derive-IG, derive-gadt, derive-monoid, derive-topdown, derive-trie, deriving-compat, digit, dingo-core, dingo-example, dingo-widgets, directory-layout, distributed-closure, distributed-process, dixi, djinn-th, docopt, dom-selector, dotfs, dph-lifted-base, dph-lifted-copy, dph-lifted-vseg, dropbox-sdk, dsh-sql, dump, dynamic-linker-template, dynamodb-simple, each, egison-quote, ehs, elm-bridge, elm-build-lib, elm-core-sources, emacs-keys, enumerate, enummapset-th, equational-reasoning, error-loc, error-location, ether, exception-hierarchy, exceptions, executable-hash, exference, exhaustive, existential, explicit-sharing, extensible, extensible-data, fclabels, feldspar-compiler, fenfire, fficxx, fficxx-runtime, fieldwise, file-command-qq, file-embed, file-embed-poly, file-location, finite-field, fitspec, fixed-precision, fixie, flamethrower, flexible-defaults, flowdock, fpco-api, free, free-functors, free-game, freekick2, functor-infix, gamma, gdiff-ig, gdiff-th, gegl, gencheck, generic-deriving, generic-xml, generics-sop, genifunctors, geniplate, geniplate-mirror, geo-uk, ghc-events-analyze, ghc-heap-view, ghc-mod, ghc-typelits-knownnat, ghci, ghcjs-vdom, git-annex, git-embed, git-monitor, gitlib-libgit2, gitlib-s3, gitrev, gladexml-accessor, global, goatee, grammar-combinators, graph-utils, groundhog-inspector, groundhog-th, gtk-helpers, gtk2hs-cast-glade, gtk2hs-cast-gnomevfs, gtk2hs-cast-gtk, gtk2hs-cast-gtkglext, gtk2hs-cast-gtksourceview2, gtk2hs-cast-th, h-booru, hLLVM, hPDB, hPDB-examples, hacanon-light, hackage-mirror, hackage-security, hackport, haiji, hako, happstack-data, happstack-dlg, happstack-ixset, happstack-plugins, happstack-server, happstack-state, happstack-util, happstack-yui, happy-meta, harpy, has-th, hascas, hashabler, haskell-exp-parser, haskell-generate, haskell-pdf-presenter, haskell-platform-test, haskell-reflect, haskell-src-exts-prisms, haskell-src-exts-qq, haskell-src-meta, haskell-src-meta-mwotton, haskell-tools-ast, haskell-tools-ast-fromghc, haskell-tools-backend-ghc, haskell-tools-refactor, haskelldb-th, haskelm, haskhol-core, hasql-postgres, hasql-th, hax, haxparse, haxr, haxr-th, hayland, hbro, hdbi, hdph, hdph-closure, heist-async, helix, hell, here, heredoc, heredocs, hermit-syb, herringbone-embed, hesh, hetero-dict, heterocephalus, hexquote, hflags, hgeometry, hgrev, hierarchical-exceptions, highjson-th, hinstaller, hlatex, hledger-web, hmatrix-static, hmatrix-syntax, hobbits, hocilib, hofix-mtl, homoiconic, homplexity, hoodle-core, hoogle, hookup, hs-di, hs-mesos, hsdev, hslogger-template, hspec-test-framework-th, hspec-wai-json, hsqml-datamodel, hssqlppp-th, hsx2hs, http-trace, huff, hxournal, iconv-typed, ide-backend, ide-backend-common, ifcxt, ihaskell-inline-r, ihaskell-rlangqq, imagepaste, include-file, indexed-do-notation, indices, influxdb, ini-qq, inline-c, inline-c-cpp, inline-c-win32, inline-java, inline-r, instant-generics, interpolate, interpolatedstring-perl6, interpolatedstring-qq, interpolatedstring-qq-mwotton, invariant, invertible, io-choice, ip-quoter, ipopt-hs, iptadmin, is, iso8583-bitmaps, isobmff-builder, isotope, iterable, ivory, ivory-backend-c, ivory-bitdata, ivory-examples, ixset, ixset-typed, jmacro, jobqueue, jose, jsc, json-extra, json-python, json-qq, kansas-lava, katip, keera-hails-mvc-model-lightmodel, keera-hails-mvc-model-protectedmodel, keera-hails-mvc-solutions-gtk, keter, kure-your-boilerplate, labels, labyrinth, labyrinth-server, laika, lambdabot-core, lambdabot-misc-plugins, lambdacms-core, lambdaya-bus, language-c-inline, language-c-quote, language-dockerfile, language-ecmascript, language-haskell-extract, language-lua-qq, language-sqlite, large-hashable, latex-function-tables, leaky, leancheck, lens, lens-family-th, lens-regex, lenses, lenz-template, liboleg, lift-generics, lighttpd-conf, lighttpd-conf-qq, linear, linux-ptrace, liquidhaskell, llsd, llvm-general, llvm-general-pure, llvm-general-quote, lmonad-yesod, loch-th, logger, logging-facade, logic-classes, lol, lookup-tables, maam, manatee, manatee-core, manatee-curl, manatee-ircclient, mangopay, marvin-interpolate, memoize, meta-misc, mgeneric, mi, microlens-th, minioperational, minirotate, module-management, modulespection, monad-log, monad-logger, monad-logger-json, monadloc, monky, mps, mpvguihs, msgpack-idl, msh, multirec, multirec-alt-deriver, murder, mustache, myTestlll, mysql-simple-quasi, mysql-simple-typed, named-records, names, names-th, neat-interpolation, needle, netspec, network-uri-static, newtype-deriving, newtype-th, ngx-export, no-role-annots, notcpp, notmuch-web, numeric-qq, nvim-hs, nvvm, oberon0, objective, once, open-typerep, open-witness, opendatatable, operate-do, optparse-simple, origami, overload, overloaded-records, pagerduty, pandoc-crossref, papillon, paragon, parameterized-data, parconc-examples, parse-help, parsergen, partial-isomorphisms, path, pcre-heavy, peakachu, peggy, perdure, persistable-record, persistent, persistent-hssqlppp, persistent-protobuf, persistent-relational-record, persistent-template, persistent-zookeeper, pg, pg-store, pgstream, pinchot, placeholders, plugins-auto, plugins-multistage, plumbers, png-file, pontarius-xmpp, portable-template-haskell-lens, postgresql-query, postgresql-simple, postgresql-simple-bind, postgresql-simple-typed, postgresql-typed, praglude, preamble, present, pringletons, printf-mauke, process-conduit, process-qq, processing, product-profunctors, prolog, property-list, protobuf-native, pseudomacros, publicsuffix, pugixml, putlenses, pyffi, pyfi, qc-oi-testgenerator, quickcheck-report, quickcheck-with-counterexamples, quipper, quipper-core, quipper-rendering, raketka, random-derive, random-fu, random-source, rattletrap, raw-feldspar, raw-strings-qq, rawr, rawstring-qm, react-flux, reasonable-lens, record, record-aeson, record-gl, record-syntax, records-th, recursion-schemes, recursors, references, refined, reflection, reflex, reflex-dom-helpers, reflex-jsx, regex, regex-examples, regex-tdfa-quasiquoter, regexp-tries, regexqq, regular, relational-postgresql8, relational-query, relational-query-HDBC, relational-record-examples, relational-schemas, relit, remote, reorderable, repa, repa-examples, respond, restful-snap, rethinkdb-client-driver, rex, rl-satton, roshask, rosmsg, roundtrip, rowrecord, rpc, rpc-framework, rtcm, ruby-qq, ruin, runtime-arbitrary, safe-globals, safe-printf, safecopy, sbp, sbvPlugin, scotty-binding-play, scrz, sdl2-gfx, sdl2-image, sdl2-mixer, seal-module, sec, selectors, semiring-num, seqaid, serokell-util, serpentine, servant-auth-token-acid, servant-swagger-ui, setters, sexp-grammar, sext, shake-persist, shaker, shakespeare, shakespeare-babel, shakespeare-sass, shapely-data, shared-fields, shell-conduit, show-please, shqq, simple-config, simplest-sqlite, singletons, size-based, sized-vector, slot-lambda, smartGroup, smartconstructor, smtlib2, snap-loader-dynamic, snap-loader-static, snap-routes, snap-templates, snaplet-mongoDB, source-code-server, specialize-th, species, splot, sprinkles, sqlite-simple-typed, sqlvalue-list, stache, stack, stack-prism, standalone-derive-topdown, state-record, stdata, stgi, stm-stats, store, stratosphere, string-qq, string-quote, string-typelits, strive, structural-traversal, structured-mongoDB, subhask, sunroof-compiler, swagger2, syb-with-class, syntactic, syntax-trees, syntax-trees-fork-bairyn, system-lifted, system-util, system-uuid, t-regex, ta, tables, tagged, tagged-th, target, tasty-th, tdoc, template-default, template-haskell-compat-v0208, template-haskell-util, template-hsml, templatepg, test-fixture, test-framework-th, test-framework-th-prime, test-simple, testing-feat, text-json-qq, text-show, text-show-instances, text-xml-generic, text-xml-qq, tfp-th, th-alpha, th-build, th-cas, th-context, th-data-compat, th-desugar, th-expand-syns, th-extras, th-fold, th-inline-io-action, th-instance-reification, th-instances, th-kinds, th-kinds-fork, th-lift, th-lift-instances, th-orphans, th-printf, th-reify-compat, th-reify-many, th-sccs, th-to-exp, th-traced, th-typegraph, th-utilities, thorn, threepenny-gui, time-parsers, time-qq, time-warp, timeplot, timezone-olson-th, tkyprof, toysolver, transformations, traverse-with-class, true-name, tttool, tuple-lenses, tuple-morph, tuple-th, tupleinstances, twentyseven, twiml, twitter-conduit, twitter-types-lens, type, type-cache, type-cereal, type-combinators-quote, type-digits, type-int, type-level, type-level-numbers, type-level-tf, type-natural, type-ord, type-ord-spine-cereal, type-settheory, type-spine, type-structure, type-sub-th, typeable-th, typedquery, typeparams, typerbole, typesafe-precure, tz, uberlast, unbound-generics, units, units-attoparsec, units-defs, universe-th, unpack-funcs, uom-plugin, uri-bytestring, uri-templater, uu-options, uuid-quasi, validated-literals, vector-instances-collections, vector-th-unbox, vgrep, vigilance, vimus, vinyl-json, vinyl-vectors, wai-app-static, wai-middleware-crowd, wai-routes, waitra, web-mongrel2, web-routes-quasi, web-routes-th, web3, webdriver-angular, weigh, werewolf, whiskers, wiring, wreq, wreq-sb, xkbcommon, xml-hamlet, xml-html-qq, xml-isogen, xml-tydom-conduit, yaml, yaml-rpc, yaop, yarr, yate, yeshql, yesod, yesod-angular, yesod-angular-ui, yesod-auth, yesod-auth-deskcom, yesod-auth-zendesk, yesod-bin, yesod-comments, yesod-continuations, yesod-core, yesod-csp, yesod-fay, yesod-form, yesod-gitrev, yesod-mangopay, yesod-paginate, yesod-purescript, yesod-raml, yesod-raml-bin, yesod-raml-docs, yesod-raml-mock, yesod-routes, yesod-sass, yesod-static, yesod-static-angular, yesod-tls, yi-language, yoko, zendesk-api, zeroth, zoom
comments powered byDisqus