postgresql-simple-0.6.5: Mid-Level PostgreSQL client library
Copyright (c) 2013 Leon P Smith
License BSD3
Maintainer Leon P Smith <leon@melding-monads.com>
Stability experimental
Safe Haskell None
Language Haskell2010

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 typoid s of the given TypeInfo s.

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.