@@ -7,8 +7,7 @@ module Hakyll.Core.Compiler
8 , runCompiler
8 , runCompiler
10− , target
10+ , compileFromString
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
79−-- | Construct a target inside a compiler
81−target :: TargetM a a -> Compiler a
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.
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 >>=)