runDB wraps around a GGHandler IO
This commit is contained in:
parent
d37fce1965
commit
12ccd1d5c9
@ -11,11 +11,11 @@ import Database.Persist
|
|||||||
import Control.Monad.Trans.Class (MonadTrans (..))
|
import Control.Monad.Trans.Class (MonadTrans (..))
|
||||||
import Control.Failure (Failure)
|
import Control.Failure (Failure)
|
||||||
|
|
||||||
import Yesod
|
import Yesod.Handler
|
||||||
|
|
||||||
class YesodPersist y where
|
class YesodPersist y where
|
||||||
type YesodDB y :: (* -> *) -> * -> *
|
type YesodDB y :: (* -> *) -> * -> *
|
||||||
runDB :: YesodDB y (GHandler sub y) a -> GHandler sub y a
|
runDB :: YesodDB y (GGHandler sub y IO) a -> GHandler sub y a
|
||||||
|
|
||||||
-- Get the given entity by ID, or return a 404 not found if it doesn't exist.
|
-- Get the given entity by ID, or return a 404 not found if it doesn't exist.
|
||||||
get404 :: (PersistBackend (t m), PersistEntity val, Monad (t m),
|
get404 :: (PersistBackend (t m), PersistEntity val, Monad (t m),
|
||||||
|
|||||||
@ -13,7 +13,7 @@ homepage: http://docs.yesodweb.com/
|
|||||||
|
|
||||||
library
|
library
|
||||||
build-depends: base >= 4 && < 5
|
build-depends: base >= 4 && < 5
|
||||||
, yesod >= 0.7 && < 0.8
|
, yesod-core >= 0.7 && < 0.8
|
||||||
, persistent >= 0.4 && < 0.5
|
, persistent >= 0.4 && < 0.5
|
||||||
, failure >= 0.1 && < 0.2
|
, failure >= 0.1 && < 0.2
|
||||||
, transformers >= 0.2 && < 0.3
|
, transformers >= 0.2 && < 0.3
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user