summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-10-28 14:05:55 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-10-28 14:05:55 -0400
commit061fbfb37e02a9a9cb42396cce63d9b67d6a9c6e (patch)
tree6d8ea2522fac733bc20e85aa50b7320c77be5eec
parent8fdc1813592d4ea72cd22c438b0357b9968fd867 (diff)
refactor
-rw-r--r--Annex/FileMatcher.hs1
-rw-r--r--Limit.hs5
-rw-r--r--Logs/PreferredContent.hs2
-rw-r--r--Types/Limit.hs19
4 files changed, 22 insertions, 5 deletions
diff --git a/Annex/FileMatcher.hs b/Annex/FileMatcher.hs
index 3abba1055..cded857a2 100644
--- a/Annex/FileMatcher.hs
+++ b/Annex/FileMatcher.hs
@@ -13,6 +13,7 @@ import Common.Annex
import Limit
import Utility.Matcher
import Types.Group
+import Types.Limit
import Logs.Group
import Logs.Remote
import Annex.UUID
diff --git a/Limit.hs b/Limit.hs
index 826b5e72b..f3586e029 100644
--- a/Limit.hs
+++ b/Limit.hs
@@ -27,6 +27,7 @@ import Types.TrustLevel
import Types.Key
import Types.Group
import Types.FileMatcher
+import Types.Limit
import Logs.Group
import Utility.HumanTime
import Utility.DataUnits
@@ -41,10 +42,6 @@ import Types.FileMatcher
#endif
#endif
-type MatchFiles = AssumeNotPresent -> FileInfo -> Annex Bool
-type MkLimit = String -> Either String MatchFiles
-type AssumeNotPresent = S.Set UUID
-
{- Checks if there are user-specified limits. -}
limited :: Annex Bool
limited = (not . Utility.Matcher.isEmpty) <$> getMatcher'
diff --git a/Logs/PreferredContent.hs b/Logs/PreferredContent.hs
index 947a31875..57367148c 100644
--- a/Logs/PreferredContent.hs
+++ b/Logs/PreferredContent.hs
@@ -26,10 +26,10 @@ import qualified Annex.Branch
import qualified Annex
import Logs
import Logs.UUIDBased
-import Limit
import qualified Utility.Matcher
import Annex.FileMatcher
import Annex.UUID
+import Types.Limit
import Types.Group
import Types.Remote (RemoteConfig)
import Logs.Group
diff --git a/Types/Limit.hs b/Types/Limit.hs
new file mode 100644
index 000000000..9d981242d
--- /dev/null
+++ b/Types/Limit.hs
@@ -0,0 +1,19 @@
+{- types for limits
+ -
+ - Copyright 2013 Joey Hess <joey@kitenet.net>
+ -
+ - Licensed under the GNU GPL version 3 or higher.
+ -}
+
+{-# LANGUAGE CPP #-}
+
+module Types.Limit where
+
+import Common.Annex
+import Types.FileMatcher
+
+import qualified Data.Set as S
+
+type MatchFiles = AssumeNotPresent -> FileInfo -> Annex Bool
+type MkLimit = String -> Either String MatchFiles
+type AssumeNotPresent = S.Set UUID