diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-12-29 22:59:38 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-12-29 22:59:38 +0100 |
commit | 6268e4a4fe961ca810da1ecb2275142a301f0813 (patch) | |
tree | 00ac59620a114259d32f8bdd15874ebec15c6f9a /src/Hakyll/Web/FileType.hs | |
parent | bf31c55c99496fe20274df73a831fb1db86591e4 (diff) | |
download | hakyll-6268e4a4fe961ca810da1ecb2275142a301f0813.tar.gz |
Experimental arrow-based approach
Diffstat (limited to 'src/Hakyll/Web/FileType.hs')
-rw-r--r-- | src/Hakyll/Web/FileType.hs | 8 |
1 files changed, 4 insertions, 4 deletions
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) |