diff options
| author | Jasper Van der Jeugt <m@jaspervdj.be> | 2012-11-12 16:10:06 +0100 |
|---|---|---|
| committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2012-11-12 16:10:06 +0100 |
| commit | 760b4344377c81922ce5ab4ba05a41f88f45165d (patch) | |
| tree | a2b7f45c61938879e4badce363f03c5abf85ae66 /src/Hakyll/Core/Identifier | |
| parent | c7d3c60c54926b54847bfc691e27f24dc644dd65 (diff) | |
| download | hakyll-760b4344377c81922ce5ab4ba05a41f88f45165d.tar.gz | |
WIP
Diffstat (limited to 'src/Hakyll/Core/Identifier')
| -rw-r--r-- | src/Hakyll/Core/Identifier/Pattern.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Hakyll/Core/Identifier/Pattern.hs b/src/Hakyll/Core/Identifier/Pattern.hs index 589bf6a..dc02be3 100644 --- a/src/Hakyll/Core/Identifier/Pattern.hs +++ b/src/Hakyll/Core/Identifier/Pattern.hs @@ -43,6 +43,7 @@ module Hakyll.Core.Identifier.Pattern , fromGlob , fromList , fromRegex + , fromVersion -- * Manipulating patterns , complement @@ -176,6 +177,11 @@ fromRegex = Regex -------------------------------------------------------------------------------- +fromVersion :: Maybe String -> Pattern a +fromVersion = Version + + +-------------------------------------------------------------------------------- -- | Inverts a pattern, e.g. -- -- > complement "foo/bar.html" @@ -190,7 +196,7 @@ complement = Complement -- -- > "foo/*.markdown" `withVersion` "pdf" withVersion :: Pattern a -> String -> Pattern a -withVersion p v = And p $ Version $ Just v +withVersion p v = And p $ fromVersion $ Just v -------------------------------------------------------------------------------- |
