-
-
Save jtojnar/4b1d3194614c644ec453 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
menuField :: Context String | |
menuField = field "menu" $ \_ -> do | |
path <- toFilePath <$> getUnderlying | |
let menuPath = takeDirectory path </> "@menu.md" | |
unsafeCompiler (readFile menuPath) >>= renderPandoc |
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
Couldn't match type ‘Item String’ with ‘[Char]’ | |
Expected type: String -> Compiler String | |
Actual type: Item String -> Compiler (Item String) | |
In the second argument of ‘(>>=)’, namely ‘renderPandoc’ | |
In a stmt of a 'do' block: | |
unsafeCompiler (readFile menuPath) >>= renderPandoc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment