diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-02-07 22:33:05 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-02-07 22:33:05 +0100 |
commit | 857d35fce4e364039092a9da37b93b67bd566bb6 (patch) | |
tree | 19a8e160af128f7c92fdc5549a4d824b0580265f /src/Text/Pandoc/Class.hs | |
parent | 1ecc48e9f9b027e9b1226fa3a43b52ae8c7004bf (diff) |
Refactored some files formerly in LaTeX reader.
* Export readFileFromDirs from Class.
* Export insertIncludedFile from Parsing.
Simplified code in LaTeX/RST readers.
Diffstat (limited to 'src/Text/Pandoc/Class.hs')
-rw-r--r-- | src/Text/Pandoc/Class.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Class.hs b/src/Text/Pandoc/Class.hs index f75db4b3a..e6913566f 100644 --- a/src/Text/Pandoc/Class.hs +++ b/src/Text/Pandoc/Class.hs @@ -40,11 +40,11 @@ module Text.Pandoc.Class ( PandocMonad(..) , modifyPureState , getPOSIXTime , getZonedTime + , readFileFromDirs , warning , warningWithPos , report , getLog - , readFileFromDirs , setVerbosity , getMediaBag , setMediaBag @@ -74,7 +74,7 @@ import qualified Text.Pandoc.Shared as IO ( readDataFile import qualified Text.Pandoc.UTF8 as UTF8 import Text.Pandoc.Compat.Time (UTCTime) import Text.Pandoc.Options (Verbosity(..)) -import Text.Pandoc.Parsing (ParserT, SourcePos) +import Text.Parsec (ParsecT, SourcePos) import qualified Text.Pandoc.Compat.Time as IO (getCurrentTime) import Text.Pandoc.MIME (MimeType, getMimeType) import Data.Time.Clock.POSIX ( utcTimeToPOSIXSeconds @@ -151,7 +151,7 @@ warning msg = report WARNING msg warningWithPos :: PandocMonad m => SourcePos -> String - -> ParserT s st m () + -> ParsecT s st m () warningWithPos pos msg = lift $ warning $ msg ++ " " ++ show pos report :: PandocMonad m => Verbosity -> String -> m () @@ -513,7 +513,7 @@ instance PandocMonad PandocPure where logOutput _level _msg = return () -instance PandocMonad m => PandocMonad (ParserT s st m) where +instance PandocMonad m => PandocMonad (ParsecT s st m) where lookupEnv = lift . lookupEnv getCurrentTime = lift getCurrentTime getCurrentTimeZone = lift getCurrentTimeZone |