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.
This commit is contained in:
parent
2825f2e41d
commit
9633c67842
5 changed files with 246 additions and 0 deletions
|
@ -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. -}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue