Resolved merge problems with metadata section in Core
Getty Ritter
8 years ago
9 | 9 |
copyright: ©2016 Getty Ritter
|
10 | 10 |
category: Text
|
11 | 11 |
build-type: Simple
|
12 | |
cabal-version: >= 1.2
|
| 12 |
cabal-version: >= 1.12
|
13 | 13 |
|
14 | 14 |
library
|
15 | 15 |
exposed-modules: Text.Ptolemy.Pandoc
|
1 | 1 |
module Text.Ptolemy.Core where
|
2 | 2 |
|
3 | 3 |
import Data.Text (Text)
|
| 4 |
import Data.Map.Strict (Map)
|
4 | 5 |
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)
|
6 | 20 |
|
7 | 21 |
type Document = Vector Block
|
8 | 22 |
type DocumentList = Vector Document
|
9 | 9 |
copyright: ©2016 Getty Ritter
|
10 | 10 |
category: Text
|
11 | 11 |
build-type: Simple
|
12 | |
cabal-version: >= 1.2
|
| 12 |
cabal-version: >= 1.12
|
13 | 13 |
|
14 | 14 |
library
|
15 | 15 |
exposed-modules: Text.Ptolemy.Core
|
16 | 16 |
ghc-options: -Wall
|
17 | 17 |
build-depends: base >=4.7 && <4.9,
|
| 18 |
containers,
|
18 | 19 |
vector,
|
19 | 20 |
text
|
20 | 21 |
default-language: Haskell2010
|