Skip to content

Generic facilities for working with Persistent classes

License

Notifications You must be signed in to change notification settings

Diamondy4/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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haskell 97.7%
  • Nix 2.3%