summaryrefslogtreecommitdiff
path: root/Types
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-02-16 17:39:54 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-02-16 17:39:54 -0400
commit083ab36d08569dd64a7ed94cdfd49753964c7bdd (patch)
tree27403db8f2304ada025dd8911d03df5801603861 /Types
parent16af107d2d573046ab09af964257cf3573889974 (diff)
filter branches (incomplete)
Promosing work toward metadata driven filter branches. A few methods to construct them are stubbed out; all the data types and pure code seems good. This commit was sponsored by Walter Somerville.
Diffstat (limited to 'Types')
-rw-r--r--Types/MetaData.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Types/MetaData.hs b/Types/MetaData.hs
index 151f456c0..d8184a768 100644
--- a/Types/MetaData.hs
+++ b/Types/MetaData.hs
@@ -16,6 +16,8 @@ module Types.MetaData (
deserialize,
MetaSerializable,
toMetaField,
+ mkMetaField,
+ tagMetaField,
fromMetaField,
toMetaValue,
mkMetaValue,
@@ -225,6 +227,9 @@ mkMetaField f = maybe (Left $ badField f) Right (toMetaField f)
badField :: String -> String
badField f = "Illegal metadata field name, \"" ++ f ++ "\""
+tagMetaField :: MetaField
+tagMetaField = MetaField "tag"
+
{- Avoid putting too many fields in the map; extremely large maps make
- the seriaization test slow due to the sheer amount of data.
- It's unlikely that more than 100 fields of metadata will be used. -}