-
-
Save mmynsted/40d0d88d7fc67b69e1790c11aa95402e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- tsDefaultCompiler :: [Identifier] -> Context String -> Item String -> Compiler (Item String) | |
-- tsDefaultCompiler | |
siteIndexCompiler :: Context String -> Item String -> Compiler (Item String) | |
siteIndexCompiler ctx = | |
loadAndApplyTemplate "templates/site-index.html" ctx | |
>=> defaultCompiler ctx | |
sitePageCompiler :: Context String -> Item String -> Compiler (Item String) | |
sitePageCompiler ctx = | |
loadAndApplyTemplate "templates/site-page.html" ctx | |
>=> defaultCompiler ctx | |
defaultCompiler :: Context String -> Item String -> Compiler (Item String) | |
defaultCompiler ctx = | |
loadAndApplyTemplate "templates/default.html" ctx | |
>=> cleanAndRelUrls |
If I change the function like this
tsDefaultCompiler ::
[Identifier] ->
Context String ->
Item String ->
Compiler (Item String)
tsDefaultCompiler ts ctx =
foldM
(\acc b -> loadAndApplyTemplate b ctx)
(empty :: Compiler (Item String))
ts
Then it compiles but the result is always the empty
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is error when I attempt to compile