gdritter repos ptolemy / 4a11d3d
Resolved merge problems with metadata section in Core Getty Ritter 8 years ago
3 changed file(s) with 18 addition(s) and 3 deletion(s). Collapse all Expand all
99 copyright: ©2016 Getty Ritter
1010 category: Text
1111 build-type: Simple
12 cabal-version: >= 1.2
12 cabal-version: >= 1.12
1313
1414 library
1515 exposed-modules: Text.Ptolemy.Pandoc
11 module Text.Ptolemy.Core where
22
33 import Data.Text (Text)
4 import Data.Map.Strict (Map)
45 import Data.Vector (Vector)
5 import qualified Data.Vector as V
6
7 type Reader = Text -> Either String Ptolemy
8 type Writer = Ptolemy -> Text
9
10 data Ptolemy = Ptolemy
11 { meta :: Maybe Meta
12 , document :: Document
13 } deriving (Eq, Show, Read, Ord)
14
15 data Meta = Meta { fromMeta :: Map Text MetaValue }
16 deriving (Eq, Show, Read, Ord)
17
18 data MetaValue = MetaValue
19 deriving (Eq, Show, Read, Ord)
620
721 type Document = Vector Block
822 type DocumentList = Vector Document
99 copyright: ©2016 Getty Ritter
1010 category: Text
1111 build-type: Simple
12 cabal-version: >= 1.2
12 cabal-version: >= 1.12
1313
1414 library
1515 exposed-modules: Text.Ptolemy.Core
1616 ghc-options: -Wall
1717 build-depends: base >=4.7 && <4.9,
18 containers,
1819 vector,
1920 text
2021 default-language: Haskell2010