Expand YesodDB for GHC 7.8.1 bug #709

This commit is contained in:
Michael Snoyman 2014-04-09 19:37:33 +03:00
parent 5a24477316
commit 588cafa223
2 changed files with 5 additions and 5 deletions

View File

@ -35,7 +35,7 @@ type YesodDB site = YesodPersistBackend site (HandlerT site IO)
class Monad (YesodPersistBackend site (HandlerT site IO)) => YesodPersist site where
type YesodPersistBackend site :: (* -> *) -> * -> *
runDB :: YesodDB site a -> HandlerT site IO a
runDB :: YesodPersistBackend site (HandlerT site IO) a -> HandlerT site IO a
-- | Helper for creating 'runDB'.
--
@ -71,7 +71,7 @@ class YesodPersist site => YesodPersistRunner site where
getDBRunner :: HandlerT site IO (DBRunner site, HandlerT site IO ())
newtype DBRunner site = DBRunner
{ runDBRunner :: forall a. YesodDB site a -> HandlerT site IO a
{ runDBRunner :: forall a. YesodPersistBackend site (HandlerT site IO) a -> HandlerT site IO a
}
-- | Helper for implementing 'getDBRunner'.
@ -106,7 +106,7 @@ defaultGetDBRunner getPool = do
--
-- Since 1.2.0
runDBSource :: YesodPersistRunner site
=> Source (YesodDB site) a
=> Source (YesodPersistBackend site (HandlerT site IO)) a
-> Source (HandlerT site IO) a
runDBSource src = do
(dbrunner, cleanup) <- lift getDBRunner
@ -116,7 +116,7 @@ runDBSource src = do
-- | Extends 'respondSource' to create a streaming database response body.
respondSourceDB :: YesodPersistRunner site
=> ContentType
-> Source (YesodDB site) (Flush Builder)
-> Source (YesodPersistBackend site (HandlerT site IO)) (Flush Builder)
-> HandlerT site IO TypedContent
respondSourceDB ctype = respondSource ctype . runDBSource

View File

@ -1,5 +1,5 @@
name: yesod-persistent
version: 1.2.2.2
version: 1.2.2.3
license: MIT
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>