From 6268e4a4fe961ca810da1ecb2275142a301f0813 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Wed, 29 Dec 2010 22:59:38 +0100 Subject: Experimental arrow-based approach --- src/Hakyll/Web/FileType.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Hakyll/Web/FileType.hs') diff --git a/src/Hakyll/Web/FileType.hs b/src/Hakyll/Web/FileType.hs index a958fed..d5a9c56 100644 --- a/src/Hakyll/Web/FileType.hs +++ b/src/Hakyll/Web/FileType.hs @@ -7,10 +7,10 @@ module Hakyll.Web.FileType ) where import System.FilePath (takeExtension) -import Control.Applicative ((<$>)) +import Control.Arrow ((>>>), arr) import Hakyll.Core.Identifier -import Hakyll.Core.Target +import Hakyll.Core.Compiler -- | Datatype to represent the different file types Hakyll can deal with by -- default @@ -51,5 +51,5 @@ fileType = fileType' . takeExtension -- | Get the file type for the current file -- -getFileType :: TargetM FileType -getFileType = fileType . toFilePath <$> getIdentifier +getFileType :: Compiler () FileType +getFileType = getIdentifier >>> arr (fileType . toFilePath) -- cgit v1.2.3