Consistent naming: target vs compiler
This commit is contained in:
parent
bd5f6ca579
commit
9939708c66
1 changed files with 4 additions and 10 deletions
|
@ -7,8 +7,7 @@ module Hakyll.Core.Compiler
|
||||||
, Compiler
|
, Compiler
|
||||||
, runCompiler
|
, runCompiler
|
||||||
, require
|
, require
|
||||||
, target
|
, compileFromString
|
||||||
, targetFromString
|
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Control.Arrow (second)
|
import Control.Arrow (second)
|
||||||
|
@ -76,14 +75,9 @@ require identifier = do
|
||||||
addDependency identifier
|
addDependency identifier
|
||||||
return $ TargetM $ flip targetDependencyLookup identifier <$> ask
|
return $ TargetM $ flip targetDependencyLookup identifier <$> ask
|
||||||
|
|
||||||
-- | Construct a target inside a compiler
|
|
||||||
--
|
|
||||||
target :: TargetM a a -> Compiler a
|
|
||||||
target = return
|
|
||||||
|
|
||||||
-- | Construct a target from a string, this string being the content of the
|
-- | Construct a target from a string, this string being the content of the
|
||||||
-- resource.
|
-- resource.
|
||||||
--
|
--
|
||||||
targetFromString :: (String -> TargetM a a) -- ^ Function to create the target
|
compileFromString :: (String -> TargetM a a) -- ^ Function to create the target
|
||||||
-> Compiler a -- ^ Resulting compiler
|
-> Compiler a -- ^ Resulting compiler
|
||||||
targetFromString = target . (getResourceString >>=)
|
compileFromString = return . (getResourceString >>=)
|
||||||
|
|
Loading…
Reference in a new issue