diff options
author | Joey Hess <joey@kitenet.net> | 2014-08-02 15:34:09 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-08-02 15:34:09 -0400 |
commit | 0ddf8152ce1353bbbcd7c87c3f67063b4aed892b (patch) | |
tree | 766b35bcef4a38f424832ade2321f6d8db079b7a /Types/StoreRetrieve.hs | |
parent | d0a8e3d6217f2924b864393d425b6d7582370d07 (diff) |
specialize Preparer a bit, so resourcePrepare can be added
The forall a. in Preparer made resourcePrepare not seem to be usable, so
I specialized a to Bool. Which works for both Preparer Storer and
Preparer Retriever, but wouldn't let the Preparer be used for hasKey
as it currently stands.
Diffstat (limited to 'Types/StoreRetrieve.hs')
-rw-r--r-- | Types/StoreRetrieve.hs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Types/StoreRetrieve.hs b/Types/StoreRetrieve.hs index 33f66efb1..bde748960 100644 --- a/Types/StoreRetrieve.hs +++ b/Types/StoreRetrieve.hs @@ -5,8 +5,6 @@ - Licensed under the GNU GPL version 3 or higher. -} -{-# LANGUAGE Rank2Types #-} - module Types.StoreRetrieve where import Common.Annex @@ -16,7 +14,7 @@ import qualified Data.ByteString.Lazy as L -- Prepares for and then runs an action that will act on a Key's -- content, passing it a helper when the preparation is successful. -type Preparer helper = forall a. Key -> (Maybe helper -> Annex a) -> Annex a +type Preparer helper = Key -> (Maybe helper -> Annex Bool) -> Annex Bool -- A source of a Key's content. data ContentSource |