-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Some helpers for using Persistent from Yesod.
--   
--   Some helpers for using Persistent from Yesod.
@package yesod-persistent
@version 1.1.0.1

module Yesod.Persist
class YesodPersist master where type family YesodPersistBackend master :: (* -> *) -> * -> *
runDB :: YesodPersist master => YesodDB sub master a -> GHandler sub master a
type YesodDB sub master = YesodPersistBackend master (GHandler sub master)

-- | Get the given entity by ID, or return a 404 not found if it doesn't
--   exist.
get404 :: (PersistStore (t m), PersistEntity val, Monad (t m), m ~ GHandler sub master, MonadTrans t, PersistMonadBackend (t m) ~ PersistEntityBackend val) => Key val -> t m val

-- | Get the given entity by unique key, or return a 404 not found if it
--   doesn't exist.
getBy404 :: (PersistUnique (t m), PersistEntity val, m ~ GHandler sub master, Monad (t m), MonadTrans t, PersistEntityBackend val ~ PersistMonadBackend (t m)) => Unique val -> t m (Entity val)
