on master help sign in
Consistent naming: target vs compiler
9939708Jasper Van der Jeugt
src/Hakyll/Core/Compiler.hs+4−10
@@ -7,8 +7,7 @@ module Hakyll.Core.Compiler
7 , Compiler
7 , Compiler
8 , runCompiler
8 , runCompiler
9 , require
9 , require
10− , target
10+ , compileFromString
11− , targetFromString
12 ) where
11 ) where
13
12
14import Control.Arrow (second)
13import Control.Arrow (second)
@@ -76,14 +75,9 @@ require identifier = do
76 addDependency identifier
75 addDependency identifier
77 return $ TargetM $ flip targetDependencyLookup identifier <$> ask
76 return $ TargetM $ flip targetDependencyLookup identifier <$> ask
78
77
79−-- | Construct a target inside a compiler
80−--
81−target :: TargetM a a -> Compiler a
82−target = return
83−
84-- | Construct a target from a string, this string being the content of the
78-- | Construct a target from a string, this string being the content of the
85-- resource.
79-- resource.
86--
80--
87−targetFromString :: (String -> TargetM a a) -- ^ Function to create the target
81+compileFromString :: (String -> TargetM a a) -- ^ Function to create the target
88− -> Compiler a -- ^ Resulting compiler
82+ -> Compiler a -- ^ Resulting compiler
89−targetFromString = target . (getResourceString >>=)
83+compileFromString = return . (getResourceString >>=)