diff options
| author | Chris Wells <chris@mathematicaster.org> | 2024-12-30 21:23:52 -0600 |
|---|---|---|
| committer | Chris Wells <chris@mathematicaster.org> | 2024-12-30 21:23:52 -0600 |
| commit | 42a2d42eecf551dd1990c97c1ae2586cd46674be (patch) | |
| tree | 873e80c07aca811167aa06caa19de7334c94048d /src/Hakyll/TeX/HaTeX.hs | |
| download | main-42a2d42eecf551dd1990c97c1ae2586cd46674be.tar main-42a2d42eecf551dd1990c97c1ae2586cd46674be.tar.gz main-42a2d42eecf551dd1990c97c1ae2586cd46674be.tar.bz2 main-42a2d42eecf551dd1990c97c1ae2586cd46674be.tar.lz main-42a2d42eecf551dd1990c97c1ae2586cd46674be.tar.xz main-42a2d42eecf551dd1990c97c1ae2586cd46674be.tar.zst main-42a2d42eecf551dd1990c97c1ae2586cd46674be.zip | |
Started writing the main utilities for my webpage
Diffstat (limited to 'src/Hakyll/TeX/HaTeX.hs')
| -rw-r--r-- | src/Hakyll/TeX/HaTeX.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Hakyll/TeX/HaTeX.hs b/src/Hakyll/TeX/HaTeX.hs new file mode 100644 index 0000000..9b83c62 --- /dev/null +++ b/src/Hakyll/TeX/HaTeX.hs @@ -0,0 +1,15 @@ +module Hakyll.TeX.HaTeX + ( hatexCompiler + , compileHatex + ) where + +import Prolog + +import Hakyll +import Text.LaTeX.Base.Parser + +compileHatex :: (StringConv s Text, Traversable t) => t s -> Compiler (t LaTeX) +compileHatex = traverse $ either (throwError . fmap messageString . errorMessages) pure . parseLaTeX . toSL + +hatexCompiler :: Compiler (Item LaTeX) +hatexCompiler = getResourceLBS >>= compileHatex |
