c***@gmail.com
2015-08-28 07:32:37 UTC
Hello!
What is the right way to compose Compilers?
I see a Compiler is an instance of Monad, Alternative...
I have two Compilers:
pandocRmdCompilerWith :: ReaderOptions -> WriterOptions -> Compiler (Item
String)
pandocRmdCompilerWith ropt wopt = do
item <- getResourceBody
if isRmd item
...
else pandocCompilerWith ropt wopt
and
pandocCompilerDiagramsWith :: ReaderOptions -> WriterOptions -> Compiler
(Item String)
pandocCompilerDiagramsWith ropt wopt = pandocCompilerWithTransformM ropt
wopt diagramsTransformer
The first is for compiling R code inside markdown. It takes Rmd files and
transforms them into HTML. If it finds a normal .md file (or something
else) it just uses the regular pandoc compiler.
The second takes a markdown file containing "diagrams" code and outputs
HTML.
How should I go to combine them?
See:
https://github.com/cdupont/hakyll-diagrams
https://github.com/cdupont/hakyll-R
Thanks
Corentin
What is the right way to compose Compilers?
I see a Compiler is an instance of Monad, Alternative...
I have two Compilers:
pandocRmdCompilerWith :: ReaderOptions -> WriterOptions -> Compiler (Item
String)
pandocRmdCompilerWith ropt wopt = do
item <- getResourceBody
if isRmd item
...
else pandocCompilerWith ropt wopt
and
pandocCompilerDiagramsWith :: ReaderOptions -> WriterOptions -> Compiler
(Item String)
pandocCompilerDiagramsWith ropt wopt = pandocCompilerWithTransformM ropt
wopt diagramsTransformer
The first is for compiling R code inside markdown. It takes Rmd files and
transforms them into HTML. If it finds a normal .md file (or something
else) it just uses the regular pandoc compiler.
The second takes a markdown file containing "diagrams" code and outputs
HTML.
How should I go to combine them?
See:
https://github.com/cdupont/hakyll-diagrams
https://github.com/cdupont/hakyll-R
Thanks
Corentin
--
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.
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.