From 18b6ac5ad42e50e75b9ee9fcfc8aef00f5a00957 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Sun, 6 Jan 2013 09:51:09 +0100 Subject: Add create in addition to match --- src/Hakyll/Core/Identifier/Pattern.hs | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'src/Hakyll/Core/Identifier') diff --git a/src/Hakyll/Core/Identifier/Pattern.hs b/src/Hakyll/Core/Identifier/Pattern.hs index 3a07219..fb9c4b8 100644 --- a/src/Hakyll/Core/Identifier/Pattern.hs +++ b/src/Hakyll/Core/Identifier/Pattern.hs @@ -44,7 +44,6 @@ module Hakyll.Core.Identifier.Pattern , complement , withVersion , noVersion - , fromLiteral -- * Applying patterns , matches @@ -234,19 +233,6 @@ 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 -fromLiteral pattern = case pattern of - Glob p -> fmap fromFilePath $ foldr fromLiteral' (Just "") p - _ -> Nothing - where - fromLiteral' (Literal x) (Just y) = Just $ x ++ y - fromLiteral' _ _ = Nothing - - - -------------------------------------------------------------------------------- -- | Check if an identifier matches a pattern matches :: Pattern -> Identifier -> Bool -- cgit v1.2.3