HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulepg-entity-0.0.4.4Haskell2010

Database.PostgreSQL.Entity.Internal.QQ

A quasi-quoter for Fields, supporting optional types.

There is little reason to import this module directly; instead, import Database.PostgreSQL.Entity, which re-exports the field quasiquoter.

  • 1 value
valuefield :: QuasiQuoter
#

A quasi-quoter for safely constructing Fields.

Example:

instance Entity BlogPost where
  tableName  = "blogposts"
  primaryKey = [field| blogpost_id |]
  fields = [ [field| blogpost_id |]
           , [field| author_id |]
           , [field| uuid_list :: uuid[] |] -- ← This is where we specify an optional PostgreSQL type annotation
           , [field| title |]
           , [field| content |]
           , [field| created_at |]
           ]