diff options
author | Jasper Van der Jeugt <m@jaspervdj.be> | 2013-01-06 08:56:51 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2013-01-06 08:56:51 +0100 |
commit | 6b7fbad7fe8634fd3c1fec37636bde7609270d31 (patch) | |
tree | 22427e6143123b2d538e2812b619301b264b152b /src/Hakyll | |
parent | 603d00fd566dac5869129a4f831b3ed9ee112afc (diff) | |
download | hakyll-6b7fbad7fe8634fd3c1fec37636bde7609270d31.tar.gz |
Add noVersion
Diffstat (limited to 'src/Hakyll')
-rw-r--r-- | src/Hakyll/Core/Identifier/Pattern.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Hakyll/Core/Identifier/Pattern.hs b/src/Hakyll/Core/Identifier/Pattern.hs index 8fbc6f8..3a07219 100644 --- a/src/Hakyll/Core/Identifier/Pattern.hs +++ b/src/Hakyll/Core/Identifier/Pattern.hs @@ -43,6 +43,7 @@ module Hakyll.Core.Identifier.Pattern , (.||.) , complement , withVersion + , noVersion , fromLiteral -- * Applying patterns @@ -228,6 +229,12 @@ withVersion p v = optimize $ And p $ fromVersion $ Just v -------------------------------------------------------------------------------- +-- | Match only if the identifier has no version set +noVersion :: Pattern -> Pattern +noVersion p = optimize $ And p $ fromVersion Nothing + + +-------------------------------------------------------------------------------- -- | Check if a pattern is a literal. @\"*.markdown\"@ is not a literal but -- @\"posts.markdown\"@ is. fromLiteral :: Pattern -> Maybe Identifier |