Skip to content

dmjio/persistent-generic

Repository files navigation

persistent-generic

Generic facilities for working with Persistent classes.

{-# language DeriveGeneric #-}

module Main where

import Database.Persist.Generic

data StopLight = Red | Yellow | Green
  deriving (Show, Eq, Generic)

instance PersistField StopLight where
  toPersistValue = genericToPersistValue
  fromPersistValue = genericFromPersistValue

Limitations

  • Only PersistField is currently supported.

About

Generic facilities for working with Persistent classes

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published