Export Text.Pandoc.Error in Text.Pandoc.
[API change]
This commit is contained in:
parent
7b1a9d7aca
commit
d51e475bad
10 changed files with 5 additions and 18 deletions
|
@ -73,7 +73,6 @@ import Control.Applicative ((<|>))
|
|||
import Text.Pandoc.Readers.Txt2Tags (getT2TMeta)
|
||||
import Paths_pandoc (getDataDir)
|
||||
import Text.Printf (printf)
|
||||
import Text.Pandoc.Error
|
||||
#ifndef _WINDOWS
|
||||
import System.Posix.Terminal (queryTerminal)
|
||||
import System.Posix.IO (stdOutput)
|
||||
|
|
|
@ -37,7 +37,6 @@ inline links:
|
|||
|
||||
> module Main where
|
||||
> import Text.Pandoc
|
||||
> import Text.Pandoc.Error (handleError)
|
||||
>
|
||||
> markdownToRST :: String -> String
|
||||
> markdownToRST =
|
||||
|
@ -60,6 +59,8 @@ module Text.Pandoc
|
|||
, module Text.Pandoc.Generic
|
||||
-- * Options
|
||||
, module Text.Pandoc.Options
|
||||
-- * Error handling
|
||||
, module Text.Pandoc.Error
|
||||
-- * Lists of readers and writers
|
||||
, readers
|
||||
, writers
|
||||
|
|
|
@ -10,8 +10,9 @@ module Text.Pandoc.Readers.EPUB
|
|||
|
||||
import Text.XML.Light
|
||||
import Text.Pandoc.Definition hiding (Attr)
|
||||
import Text.Pandoc.Walk (walk, query)
|
||||
import Text.Pandoc.Readers.HTML (readHtml)
|
||||
import Text.Pandoc.Error
|
||||
import Text.Pandoc.Walk (walk, query)
|
||||
import Text.Pandoc.Options ( ReaderOptions(..), readerTrace)
|
||||
import Text.Pandoc.Shared (escapeURI, collapseFilePath, addMetaField)
|
||||
import Network.URI (unEscapeString)
|
||||
|
@ -35,8 +36,6 @@ import Control.DeepSeq (deepseq, NFData)
|
|||
|
||||
import Debug.Trace (trace)
|
||||
|
||||
import Text.Pandoc.Error
|
||||
|
||||
type Items = M.Map String (FilePath, MimeType)
|
||||
|
||||
readEPUB :: ReaderOptions -> BL.ByteString -> Either PandocError (Pandoc, MediaBag)
|
||||
|
|
|
@ -7,7 +7,6 @@ import Tests.Helpers
|
|||
import Text.Pandoc.Arbitrary()
|
||||
import Text.Pandoc.Builder
|
||||
import Text.Pandoc
|
||||
import Text.Pandoc.Error
|
||||
|
||||
html :: String -> Pandoc
|
||||
html = handleError . readHtml def
|
||||
|
|
|
@ -7,7 +7,6 @@ import Tests.Helpers
|
|||
import Text.Pandoc.Arbitrary()
|
||||
import Text.Pandoc.Builder
|
||||
import Text.Pandoc
|
||||
import Text.Pandoc.Error
|
||||
|
||||
latex :: String -> Pandoc
|
||||
latex = handleError . readLaTeX def
|
||||
|
|
|
@ -7,9 +7,7 @@ import Tests.Helpers
|
|||
import Text.Pandoc.Arbitrary()
|
||||
import Text.Pandoc.Builder
|
||||
import qualified Data.Set as Set
|
||||
-- import Text.Pandoc.Shared ( normalize )
|
||||
import Text.Pandoc
|
||||
import Text.Pandoc.Error
|
||||
|
||||
markdown :: String -> Pandoc
|
||||
markdown = handleError . readMarkdown def
|
||||
|
|
|
@ -5,18 +5,13 @@ import Text.Pandoc.Options
|
|||
import Text.Pandoc.Readers.Native
|
||||
import Text.Pandoc.Readers.Markdown
|
||||
import Text.Pandoc.Definition
|
||||
import Text.Pandoc.Error
|
||||
import Tests.Helpers
|
||||
import Test.Framework
|
||||
--import Test.HUnit (assertBool)
|
||||
--import Test.Framework.Providers.HUnit
|
||||
import qualified Data.ByteString.Lazy as B
|
||||
import Text.Pandoc.Readers.Odt
|
||||
import Text.Pandoc.Writers.Native (writeNative)
|
||||
import qualified Data.Map as M
|
||||
--import Text.Pandoc.MediaBag (MediaBag, lookupMedia, mediaDirectory)
|
||||
--import Codec.Archive.Zip
|
||||
|
||||
import Text.Pandoc.Error
|
||||
|
||||
tests :: [Test]
|
||||
tests = testsComparingToMarkdown ++ testsComparingToNative
|
||||
|
|
|
@ -7,7 +7,6 @@ import Tests.Helpers
|
|||
import Text.Pandoc.Builder
|
||||
import Text.Pandoc
|
||||
import Data.List (intersperse)
|
||||
import Text.Pandoc.Error
|
||||
|
||||
org :: String -> Pandoc
|
||||
org = handleError . readOrg def
|
||||
|
|
|
@ -7,7 +7,6 @@ import Tests.Helpers
|
|||
import Text.Pandoc.Arbitrary()
|
||||
import Text.Pandoc.Builder
|
||||
import Text.Pandoc
|
||||
import Text.Pandoc.Error
|
||||
|
||||
rst :: String -> Pandoc
|
||||
rst = handleError . readRST def{ readerStandalone = True }
|
||||
|
|
|
@ -7,7 +7,6 @@ import Tests.Helpers
|
|||
import Text.Pandoc.Arbitrary()
|
||||
import Text.Pandoc.Builder
|
||||
import Text.Pandoc
|
||||
import Text.Pandoc.Error
|
||||
import Data.List (intersperse)
|
||||
import Text.Pandoc.Readers.Txt2Tags
|
||||
|
||||
|
|
Loading…
Reference in a new issue