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

Copyright(c) 2013 Leon P Smith
LicenseBSD3
MaintainerLeon P Smith <leon@melding-monads.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell98

Database.PostgreSQL.Simple.TypeInfo.Macro

Description

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

Synopsis

Documentation

mkCompats :: [TypeInfo] -> ExpQ Source #

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 -> ExpQ Source #

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