diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Hakyll.hs | 2 | ||||
-rw-r--r-- | src/Hakyll/Core/UnixFilter.hs | 4 | ||||
-rw-r--r-- | src/Hakyll/Core/Util/Arrow.hs | 40 |
3 files changed, 2 insertions, 44 deletions
diff --git a/src/Hakyll.hs b/src/Hakyll.hs index 45ff089..13c75d8 100644 --- a/src/Hakyll.hs +++ b/src/Hakyll.hs @@ -13,7 +13,6 @@ module Hakyll #ifdef UNIX_FILTER , module Hakyll.Core.UnixFilter #endif - , module Hakyll.Core.Util.Arrow , module Hakyll.Core.Util.File , module Hakyll.Core.Util.String , module Hakyll.Core.Writable @@ -46,7 +45,6 @@ import Hakyll.Core.Rules #ifdef UNIX_FILTER import Hakyll.Core.UnixFilter #endif -import Hakyll.Core.Util.Arrow import Hakyll.Core.Util.File import Hakyll.Core.Util.String import Hakyll.Core.Writable diff --git a/src/Hakyll/Core/UnixFilter.hs b/src/Hakyll/Core/UnixFilter.hs index ce1e9db..dc82366 100644 --- a/src/Hakyll/Core/UnixFilter.hs +++ b/src/Hakyll/Core/UnixFilter.hs @@ -26,7 +26,7 @@ import Hakyll.Core.Compiler -- as a compiler. -- -- > rev :: Compiler String --- > rev = getResourceString >>= unixFilter "rev" [] +-- > rev = getResourceString >>= itemM (unixFilter "rev" []) -- -- A more realistic example: one can use this to call, for example, the sass -- compiler on CSS files. More information about sass can be found here: @@ -38,7 +38,7 @@ import Hakyll.Core.Compiler -- > match "style.scss" $ do -- > route $ setExtension "css" -- > compile $ getResourceString >>= --- > unixFilter "sass" ["-s", "--scss"] >>= +-- > itemM (unixFilter "sass" ["-s", "--scss"]) >>= -- > compressCssCompiler unixFilter :: String -- ^ Program name -> [String] -- ^ Program args diff --git a/src/Hakyll/Core/Util/Arrow.hs b/src/Hakyll/Core/Util/Arrow.hs deleted file mode 100644 index 96a5e09..0000000 --- a/src/Hakyll/Core/Util/Arrow.hs +++ /dev/null @@ -1,40 +0,0 @@ --------------------------------------------------------------------------------- --- | Various arrow utility functions -module Hakyll.Core.Util.Arrow - ( ArrowMap (..) - , constA - , sequenceA - , unitA - ) where - - --------------------------------------------------------------------------------- -import Control.Arrow (Arrow, ArrowChoice, arr, (&&&), (>>^)) - - --------------------------------------------------------------------------------- --- | Additional arrow typeclass for performance reasons. -class ArrowChoice a => ArrowMap a where - mapA :: a b c -> a [b] [c] - - --------------------------------------------------------------------------------- -instance ArrowMap (->) where - mapA = map - - --------------------------------------------------------------------------------- -constA :: Arrow a => c -> a b c -constA = arr . const - - --------------------------------------------------------------------------------- -sequenceA :: Arrow a => [a b c] -> a b [c] -sequenceA = foldr reduce $ constA [] - where - reduce xa la = xa &&& la >>^ arr (uncurry (:)) - - --------------------------------------------------------------------------------- -unitA :: Arrow a => a b () -unitA = constA () |