-
-
Save mmynsted/0465fbc9f253231d7a04b1370b7e946f 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
makeTagFiles tags = \tag pattern -> (do | |
route idRoute | |
compile (do | |
posts <- recentFirst =<< loadAll pattern | |
let postsField = listField "posts" postCtx (pure posts) | |
let titleField = constField "title" ("Posts tagged \"" <> tag <> "\"") | |
let ctx = postCtxWithTags tags `mappend` postsField `mappend` titleField `mappend` siteCtx | |
makeItem "" | |
>>= loadAndApplyTemplate "templates/tag.html" ctx | |
>>= loadAndApplyTemplate "templates/default.html" ctx | |
>>= relativizeUrls)) |
Opps. Top line of the error message was missing from my comment.
site.hs:183:26: Error: Parse error
site.hs:183:26: Error: Parse error
Found:
--
makeTagFiles :: Tags -> (String -> Pattern -> Rules ())
> makeTagFiles tags = \tag pattern ->
(do
route idRoute
Okay with newer hlint
I get:
Error: Parse error: on input `pattern'
Found:
--
makeTagFiles :: Tags -> (String -> Pattern -> Rules ())
> makeTagFiles tags = \tag pattern ->
(do
route idRoute
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why do I get a parse error from
hlint
? I have re-written this a bunch of times. This time I eliminated all use of$
.