[web-devel] [Yesod] how to write PersistFIeld instance?

Katsutoshi Itoh cutsea110 at gmail.com
Thu Feb 3 17:34:03 CET 2011

I'd like to introduce serializable data type like this:

data Role = Teacher | Student
                   deriving (Read, Show, Eq, Ord)

share2 mkPersist (mkMigrate "migrateAll") [$persist|
         ident String
         role Role Maybe Update

instance PersistField Role where
      Would you teach me how to write this instance?

More information about the web-devel mailing list