Discussion:
[hakyll] Compile errors when switch from stackage lts-9.18 to lts-10.5
k***@gmail.com
2018-02-23 09:51:35 UTC
Permalink
I guess the pandoc API had a breaking change. My code contains:

tpl <- loadBody tplIdentifier
let output = Text.Pandoc.Templates.renderTemplate' tpl yaml
makeItem output

After switching to lts-10.5 I get the compile error:

No instance for (PandocMonad [])


Not sure, how to attack the problem. Help appreciated.

Michel
--
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jasper Van der Jeugt
2018-02-23 11:13:05 UTC
Permalink
Hmm, yeah this is a change in Pandoc. It now returns results in a
`PandocMonad` in a bunch of places, including `renderTemplate`.

GHC infers that the particular monad must be a list which is causing the
weird error message.

Try:

tpl <- loadBody tplIdentifier
output <- either fail return $ runPure $
Text.Pandoc.Templates.renderTemplate' tpl yaml
makeItem output

See `runPure`:

https://hackage.haskell.org/package/pandoc-2.1.1/docs/Text-Pandoc-Class.html#v:runPure

Hope this helps
Jasper
Post by k***@gmail.com
tpl <- loadBody tplIdentifier
let output = Text.Pandoc.Templates.renderTemplate' tpl yaml
makeItem output
No instance for (PandocMonad [])
Not sure, how to attack the problem. Help appreciated.
Michel
--
You received this message because you are subscribed to the Google Groups "hakyll" group.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
k***@gmail.com
2018-02-23 14:35:27 UTC
Permalink
Thanks a lot. This solved the issue.
--
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...