postgresql-simple-0.3.6.0: Mid-Level PostgreSQL client library

Stabilityexperimental
MaintainerLeon P Smith <leon@melding-monads.com>
Safe HaskellNone

Database.PostgreSQL.Simple.TypeInfo.Macro

Description

A Template Haskell macro for efficiently checking membership in a set of type oids.

Synopsis

Documentation

mkCompats :: [TypeInfo] -> ExpQSource

Returns an expression that has type Oid -> Bool, true if the oid is equal to any one of the typoids of the given TypeInfos.

inlineTypoid :: TypeInfo -> ExpQSource

Literally substitute the value of a TypeInfo expression. Returns an expression of type Oid. Useful because GHC tends not to fold constants.