@@ -25,6 +25,8 @@ module Hakyll.Core.Identifier
2525 ( Identifier (..)
2626 , parseIdentifier
2727 , toFilePath
28+ , setGroup
29+ , hasGroup
2830 ) where
2931
3032import Control.Arrow (second)
@@ -73,3 +75,13 @@ parseIdentifier = Identifier Nothing
7375--
7476toFilePath :: Identifier -> FilePath
7577toFilePath = identifierPath
78+
79+-- | Set the identifier group for some identifier
80+--
81+setGroup :: String -> Identifier -> Identifier
82+setGroup g (Identifier _ p) = Identifier (Just g) p
83+
84+-- | Check if an identifier belongs to a certain group
85+--
86+hasGroup :: String -> Identifier -> Bool
87+hasGroup g (Identifier g' _) = Just g == g'