HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

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 |]
           ]