postgresql-orm-0.5.0: An ORM (Object Relational Mapping) and migrations DSL for PostgreSQL.

Data.RequireSelector

Synopsis

Documentation

class RequireSelector a Source #

The point of this class is to ensure that you are using data types defined with record selectors (i.e., data Foo = Foo { unFoo :: Int } as opposed to data Foo = Foo Int).

Unfortunately, GHC.Generics makes the NoSelector type a member of the Selector class. Hence, if you want to ensure a type a is not NoSelector, use the context (RequireSelector a) =>.

If you see a compilation error involving RequireSelector or IntentionallyCauseError, it means you failed to define one of your datatypes using record selector syntax.

Instances

 Source #