Merge pull request #1456 from eborden/eborden/fix-constraints-on-get404
Fix constraints on get404 and getBy404
This commit is contained in:
commit
c21e77947c
@ -1,3 +1,7 @@
|
|||||||
|
## 1.4.3
|
||||||
|
|
||||||
|
* Fix overly powerful constraints on get404 and getBy404.
|
||||||
|
|
||||||
## 1.4.2
|
## 1.4.2
|
||||||
|
|
||||||
* Fix warnings
|
* Fix warnings
|
||||||
|
|||||||
@ -134,7 +134,7 @@ respondSourceDB ctype = respondSource ctype . runDBSource
|
|||||||
|
|
||||||
-- | 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.
|
||||||
#if MIN_VERSION_persistent(2,5,0)
|
#if MIN_VERSION_persistent(2,5,0)
|
||||||
get404 :: (MonadIO m, PersistStore backend, PersistRecordBackend val backend)
|
get404 :: (MonadIO m, PersistStoreRead backend, PersistRecordBackend val backend)
|
||||||
=> Key val
|
=> Key val
|
||||||
-> ReaderT backend m val
|
-> ReaderT backend m val
|
||||||
#else
|
#else
|
||||||
@ -151,7 +151,7 @@ get404 key = do
|
|||||||
-- | Get the given entity by unique key, or return a 404 not found if it doesn't
|
-- | Get the given entity by unique key, or return a 404 not found if it doesn't
|
||||||
-- exist.
|
-- exist.
|
||||||
#if MIN_VERSION_persistent(2,5,0)
|
#if MIN_VERSION_persistent(2,5,0)
|
||||||
getBy404 :: (PersistUnique backend, PersistRecordBackend val backend, MonadIO m)
|
getBy404 :: (PersistUniqueRead backend, PersistRecordBackend val backend, MonadIO m)
|
||||||
=> Unique val
|
=> Unique val
|
||||||
-> ReaderT backend m (Entity val)
|
-> ReaderT backend m (Entity val)
|
||||||
#else
|
#else
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: yesod-persistent
|
name: yesod-persistent
|
||||||
version: 1.4.2
|
version: 1.4.3
|
||||||
license: MIT
|
license: MIT
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Michael Snoyman <michael@snoyman.com>
|
author: Michael Snoyman <michael@snoyman.com>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user