@@ -43,6 +43,7 @@ module Hakyll.Core.Identifier.Pattern
4343 , (.||.)
4444 , complement
4545 , withVersion
46+ , noVersion
4647 , fromLiteral
4748
4849 -- * Applying patterns
@@ -227,6 +228,12 @@ withVersion :: Pattern -> String -> Pattern
227228withVersion p v = optimize $ And p $ fromVersion $ Just v
228229
229230
231+--------------------------------------------------------------------------------
232+-- | Match only if the identifier has no version set
233+noVersion :: Pattern -> Pattern
234+noVersion p = optimize $ And p $ fromVersion Nothing
235+
236+
230237--------------------------------------------------------------------------------
231238-- | Check if a pattern is a literal. @\"*.markdown\"@ is not a literal but
232239-- @\"posts.markdown\"@ is.