diff options
| author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-01-27 18:52:11 +0100 |
|---|---|---|
| committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-01-27 18:52:11 +0100 |
| commit | f9a4b4f6f4b4e5f9b8c0121a4a45529059dae48a (patch) | |
| tree | 8869c019b3577baa51fc7d076c4808658b0048d7 /src/Text/Hakyll/Internal | |
| parent | 592845985828f3ee135c309257e9bbcb305be1fa (diff) | |
| download | hakyll-f9a4b4f6f4b4e5f9b8c0121a4a45529059dae48a.tar.gz | |
Added an option for categories instead/in addition to tags. Experimental.
Diffstat (limited to 'src/Text/Hakyll/Internal')
| -rw-r--r-- | src/Text/Hakyll/Internal/Template.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Text/Hakyll/Internal/Template.hs b/src/Text/Hakyll/Internal/Template.hs index b6f73b7..6349dce 100644 --- a/src/Text/Hakyll/Internal/Template.hs +++ b/src/Text/Hakyll/Internal/Template.hs @@ -12,6 +12,7 @@ import Data.List (isPrefixOf) import Data.Char (isAlphaNum) import Data.Binary import Control.Monad (liftM, liftM2, replicateM) +import Control.Applicative ((<$>)) import Data.Maybe (fromMaybe) import System.FilePath ((</>)) import Control.Monad.Reader (liftIO) @@ -95,10 +96,10 @@ instance Binary Template where arbitraryTemplate :: Int -> Gen Template arbitraryTemplate 0 = return End arbitraryTemplate length' = oneof [ do chunk <- chunk' - template' >>= return . Chunk chunk + Chunk chunk <$> template' , do key <- key' - template' >>= return . Identifier key - , template' >>= return . EscapeCharacter + Identifier key <$> template' + , EscapeCharacter <$> template' ] where template' = arbitraryTemplate (length' - 1) |
