Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
mtl switched from ErrorT to ExceptT, but we're not sure which mtl we'll
be dealing with. This should make errors work with both.
The main difference (beside the name of the module and the monad
transformer) is that Except doesn't require an instance of an Error
Typeclass. So we define that for compatability. When we switch to a
later mtl, using Control.Monad.Exception, we can just erase the instance
declaration, and all should work fine.
|
|
This modifies the Docx type in the parser to avoid all the extra files
(Notes, numbering, etc). A reader monad keeps track of these, and applies
them at the end. The reader monad is stacked with ErrorT to enable better
error-handling than the old Maybes. (Note that the better error handling
isn't really there yet, but it is now possible.)
One long-term goal of these changes is to make it easier to write the Docx
type. This should make it easier to develop a standalone docx package in the
future.
|
|
This will allow us to deal with unicode characters from word equations. This
part of the process will need to continue to be improved.
|
|
|
|
This lets us keep more information about the indentation, and act
accordingly in the reader.
|
|
Remove some redundant ways of dealing with Maybe.
|
|
mapMaybe does the filtering for us.
|
|
This is just for the Parse module, reading it into the Docx format. It
still has to be translated into pandoc.
|
|
Insertion and deletion. Dates are just strings for now.
|
|
|
|
This will allow us to get rid of more general functions we no longer need in
the main reader.
|
|
This defines a typeclass `Reducible` which allows us to "reduce" pandoc
Inlines and Blocks, like so
Emph [Strong [Str "foo", Space]] <++> Strong [Emph [Str "bar"]], Str
"baz"] =
[Strong [Emph [Str "foo", Space, Str "bar"], Space, Str "baz"]]
So adjacent formattings and strings are appropriately grouped.
Another set of operators for `(Reducible a) => (Many a)` are also
included.
|
|
|
|
For consistency with the existing writer.
|