Copyright | (C) 2016-17 William Casarin |
---|---|
License | MIT |
Maintainer | William Casarin <bill@casarin.me> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
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 }"
Generic (Ent field a) Source # | |
(KnownSymbol field, ToJSON a, ToJSON (Key a)) => ToJSON (Ent field a) Source # | |
(ToBackendKey SqlBackend a, PersistEntity a, KnownSymbol field, FromJSON a) => FromJSON (Ent field a) Source # | |
(KnownSymbol field, ElmType a) => ElmType (Ent field a) Source # | |
type Rep (Ent field a) Source # | |