more scaffolding
This commit is contained in:
parent
5bf0487023
commit
2027c8569f
4 changed files with 23 additions and 9 deletions
18
app/IR.hs
18
app/IR.hs
|
@ -1,4 +1,18 @@
|
|||
module IR (
|
||||
) where
|
||||
module IR where
|
||||
|
||||
import Data.Text
|
||||
|
||||
-- Html and Math tags come with their data because they are leaves for us
|
||||
-- We aren't parsing that if we can avoid it
|
||||
data Tag = Heading {level :: Int} | Paragraph | Blockquote | Code | Html {html :: Text} | Anchor | Italic | Bold | Math {mathML :: Text}
|
||||
|
||||
data Data = Ast {ast :: AST} | Text {text :: Text}
|
||||
|
||||
data AST = AST {tag :: Tag, child :: [Data]}
|
||||
|
||||
-- for processing math
|
||||
-- https://hackage.haskell.org/package/typst-0.6.1/docs/Typst-Parse.html#v:parseTypst
|
||||
-- and
|
||||
-- https://hackage.haskell.org/package/typst-symbols-0.1.7/docs/Typst-Symbols.html
|
||||
-- are going to be used for handling typst and
|
||||
-- texmath for latex handling
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module Markdown (
|
||||
) where
|
||||
|
||||
module Markdown where
|
||||
|
||||
-- https://spec.commonmark.org/0.31.2/
|
||||
-- https://hackage.haskell.org/package/parsec
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module Restruct (
|
||||
) where
|
||||
|
||||
module Restruct where
|
||||
|
||||
-- https://docutils.sourceforge.io/rst.html
|
||||
-- https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html
|
||||
|
|
|
@ -35,7 +35,7 @@ executable psb
|
|||
|
||||
-- Other library packages from which modules are imported.
|
||||
-- https://hackage.haskell.org/package/texmath
|
||||
build-depends: base >=4.17.2.1, mustache >=2.4.2, pandoc >=3.2.1, shake >= 0.19.8, deriving-aeson >= 0.2.9, aeson, text, time, unordered-containers, yaml, parsec >= 3.1.18.0
|
||||
build-depends: base >=4.17.2.1, mustache >=2.4.2, pandoc >=3.2.1, shake >= 0.19.8, deriving-aeson >= 0.2.9, aeson, text, time, unordered-containers, yaml, parsec >= 3.1.18.0, typst >= 0.6.1, typst-symbols >= 0.1.7
|
||||
|
||||
-- Directories containing source files.
|
||||
hs-source-dirs: app
|
||||
|
|
Loading…
Reference in a new issue