Type-safe, non-relational, multi-backend persistence.

Version on this page:
LTS Haskell 15.14:
Stackage Nightly 2020-05-26:
Latest on Hackage:

See all snapshots persistent-template appears in

MIT licensed by Michael Snoyman

Module documentation for

This version can be pinned in stack with:[email protected]:662b6197613138a4a4341749e2b7cf3a409dc6cdf2ce5a927d78279af1ed8789,2216


Provides Template Haskell helpers for persistent. For more information, see the chapter in the Yesod book.

code organization

The TH.hs module contains code generators. persistent-template uses EntityDefs that it gets from the quasi-quoter. The quasi-quoter is in persistent Quasi.hs Similarly mant of the types come from the persistent library


  • fix a bad Eq instance /= definition for Key when mpsGenetric=True


  • Support for GHC 8 #556


  • aeson 0.11
  • transformers 0.5

By default explicitly use Int64 for foreign key references. This avoids confusion on a 32 bit system.

Support foreign key references to composite primary keys

Support for monad-control 1.0