| Copyright | (C) 2016-17 William Casarin |
|---|---|
| License | MIT |
| Maintainer | William Casarin <bill@casarin.me> |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Elm.Export.Persist.Ent
Description
Documentation
newtype Ent (field :: Symbol) a Source #
Entity wrapper that adds ToJSON, FromJSON, and ElmType instances
The first type parameter field is a symbol used for the key name
>>>toElmTypeSource (Proxy :: Proxy (Ent "userId" User))"type alias User = { userName : String, userId : Int }"
Instances
| Generic (Ent field a) Source # | |
| (KnownSymbol field, ToJSON a, ToJSON (Key a)) => ToJSON (Ent field a) Source # | |
Defined in Elm.Export.Persist.Ent | |
| (ToBackendKey SqlBackend a, PersistEntity a, KnownSymbol field, FromJSON a) => FromJSON (Ent field a) Source # | |
| (KnownSymbol field, ElmType a) => ElmType (Ent field a) Source # | |
Defined in Elm.Export.Persist.Ent Methods toElmType :: Ent field a -> ElmDatatype # | |
| type Rep (Ent field a) Source # | |
Defined in Elm.Export.Persist.Ent | |