Use implicit Prelude (#6187)
* Use implicit Prelude The previous behavior was introduced as a fix for #4464. It seems that this change alone did not fix the issue, and `stack ghci` and `cabal repl` only work with GHC 8.4.1 or newer, as no custom Prelude is loaded for these versions. Given this, it seems cleaner to revert to the implicit Prelude. * PandocMonad: remove outdated check for base version Only base versions 4.9 and later are supported, the check for `MIN_VERSION_base(4,8,0)` is therefore unnecessary. * Always use custom prelude Previously, the custom prelude was used only with older GHC versions, as a workaround for problems with ghci. The ghci problems are resolved by replacing package `base` with `base-noprelude`, allowing for consistent use of the custom prelude across all GHC versions.
This commit is contained in:
parent
76705dfeb0
commit
a5fa55969f
160 changed files with 33 additions and 353 deletions
72
pandoc.cabal
72
pandoc.cabal
|
@ -377,7 +377,8 @@ flag trypandoc
|
||||||
Default: False
|
Default: False
|
||||||
|
|
||||||
library
|
library
|
||||||
build-depends: base >= 4.9 && < 5,
|
build-depends: base-noprelude >= 4.9 && < 5,
|
||||||
|
base-compat >= 0.9,
|
||||||
syb >= 0.1 && < 0.8,
|
syb >= 0.1 && < 0.8,
|
||||||
containers >= 0.4.2.1 && < 0.7,
|
containers >= 0.4.2.1 && < 0.7,
|
||||||
unordered-containers >= 0.2 && < 0.3,
|
unordered-containers >= 0.2 && < 0.3,
|
||||||
|
@ -440,10 +441,6 @@ library
|
||||||
build-depends: basement >= 0.0.10,
|
build-depends: basement >= 0.0.10,
|
||||||
foundation >= 0.0.23
|
foundation >= 0.0.23
|
||||||
-- basement 0.0.9 won't build on 32-bit windows.
|
-- basement 0.0.9 won't build on 32-bit windows.
|
||||||
if impl(ghc < 8.4)
|
|
||||||
hs-source-dirs: prelude
|
|
||||||
other-modules: Prelude
|
|
||||||
build-depends: base-compat >= 0.9
|
|
||||||
if os(windows)
|
if os(windows)
|
||||||
cpp-options: -D_WINDOWS
|
cpp-options: -D_WINDOWS
|
||||||
else
|
else
|
||||||
|
@ -471,7 +468,8 @@ library
|
||||||
|
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
other-extensions: NoImplicitPrelude
|
other-extensions: NoImplicitPrelude
|
||||||
hs-source-dirs: src
|
hs-source-dirs: src,
|
||||||
|
prelude
|
||||||
|
|
||||||
exposed-modules: Text.Pandoc,
|
exposed-modules: Text.Pandoc,
|
||||||
Text.Pandoc.App,
|
Text.Pandoc.App,
|
||||||
|
@ -565,7 +563,8 @@ library
|
||||||
Text.Pandoc.ImageSize,
|
Text.Pandoc.ImageSize,
|
||||||
Text.Pandoc.BCP47,
|
Text.Pandoc.BCP47,
|
||||||
Text.Pandoc.Class
|
Text.Pandoc.Class
|
||||||
other-modules: Text.Pandoc.App.CommandLineOptions,
|
other-modules: Prelude,
|
||||||
|
Text.Pandoc.App.CommandLineOptions,
|
||||||
Text.Pandoc.App.FormatHeuristics,
|
Text.Pandoc.App.FormatHeuristics,
|
||||||
Text.Pandoc.App.Opt,
|
Text.Pandoc.App.Opt,
|
||||||
Text.Pandoc.App.OutputSettings,
|
Text.Pandoc.App.OutputSettings,
|
||||||
|
@ -640,19 +639,19 @@ library
|
||||||
buildable: True
|
buildable: True
|
||||||
|
|
||||||
executable pandoc
|
executable pandoc
|
||||||
build-depends: pandoc, base >= 4.8 && < 5
|
build-depends: pandoc,
|
||||||
if impl(ghc < 8.4)
|
base-noprelude >= 4.8 && < 5,
|
||||||
hs-source-dirs: prelude
|
base-compat >= 0.9
|
||||||
other-modules: Prelude
|
|
||||||
build-depends: base-compat >= 0.9
|
|
||||||
if flag(static)
|
if flag(static)
|
||||||
ld-options: -static
|
ld-options: -static
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
other-extensions: NoImplicitPrelude
|
other-extensions: NoImplicitPrelude
|
||||||
hs-source-dirs: .
|
hs-source-dirs: .
|
||||||
|
prelude
|
||||||
main-is: pandoc.hs
|
main-is: pandoc.hs
|
||||||
buildable: True
|
buildable: True
|
||||||
other-modules: Paths_pandoc
|
other-modules: Paths_pandoc,
|
||||||
|
Prelude
|
||||||
ghc-options: -rtsopts -with-rtsopts=-K16m -threaded
|
ghc-options: -rtsopts -with-rtsopts=-K16m -threaded
|
||||||
-Wall -fno-warn-unused-do-bind
|
-Wall -fno-warn-unused-do-bind
|
||||||
-Wincomplete-record-updates
|
-Wincomplete-record-updates
|
||||||
|
@ -667,19 +666,16 @@ executable pandoc
|
||||||
|
|
||||||
executable trypandoc
|
executable trypandoc
|
||||||
main-is: trypandoc.hs
|
main-is: trypandoc.hs
|
||||||
hs-source-dirs: trypandoc
|
hs-source-dirs: trypandoc, prelude
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
other-extensions: NoImplicitPrelude
|
other-extensions: NoImplicitPrelude
|
||||||
|
other-modules: Prelude
|
||||||
if flag(trypandoc)
|
if flag(trypandoc)
|
||||||
build-depends: base, aeson, pandoc,
|
build-depends: base-noprelude, base-compat >= 0.9, aeson, pandoc,
|
||||||
text, wai-extra, wai >= 0.3, http-types
|
text, wai-extra, wai >= 0.3, http-types
|
||||||
buildable: True
|
buildable: True
|
||||||
else
|
else
|
||||||
buildable: False
|
buildable: False
|
||||||
if impl(ghc < 8.4)
|
|
||||||
hs-source-dirs: prelude
|
|
||||||
other-modules: Prelude
|
|
||||||
build-depends: base-compat >= 0.9
|
|
||||||
ghc-options: -rtsopts -with-rtsopts=-K16m -threaded
|
ghc-options: -rtsopts -with-rtsopts=-K16m -threaded
|
||||||
-Wall -fno-warn-unused-do-bind
|
-Wall -fno-warn-unused-do-bind
|
||||||
-Wincomplete-record-updates
|
-Wincomplete-record-updates
|
||||||
|
@ -695,18 +691,16 @@ executable trypandoc
|
||||||
benchmark weigh-pandoc
|
benchmark weigh-pandoc
|
||||||
type: exitcode-stdio-1.0
|
type: exitcode-stdio-1.0
|
||||||
main-is: weigh-pandoc.hs
|
main-is: weigh-pandoc.hs
|
||||||
hs-source-dirs: benchmark
|
hs-source-dirs: benchmark,
|
||||||
|
prelude
|
||||||
build-depends: pandoc,
|
build-depends: pandoc,
|
||||||
base >= 4.8 && < 5,
|
base-noprelude >= 4.8 && < 5,
|
||||||
|
base-compat >= 0.9,
|
||||||
text,
|
text,
|
||||||
weigh >= 0.0 && < 0.1,
|
weigh >= 0.0 && < 0.1,
|
||||||
mtl >= 2.2 && < 2.3
|
mtl >= 2.2 && < 2.3
|
||||||
if impl(ghc < 8.4)
|
|
||||||
hs-source-dirs: prelude
|
|
||||||
other-modules: Prelude
|
|
||||||
build-depends: base-compat >= 0.9
|
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
other-extensions: NoImplicitPrelude
|
other-modules: Prelude
|
||||||
ghc-options: -rtsopts -with-rtsopts=-K16m -threaded
|
ghc-options: -rtsopts -with-rtsopts=-K16m -threaded
|
||||||
-Wall -fno-warn-unused-do-bind
|
-Wall -fno-warn-unused-do-bind
|
||||||
-Wincomplete-record-updates
|
-Wincomplete-record-updates
|
||||||
|
@ -723,8 +717,10 @@ benchmark weigh-pandoc
|
||||||
test-suite test-pandoc
|
test-suite test-pandoc
|
||||||
type: exitcode-stdio-1.0
|
type: exitcode-stdio-1.0
|
||||||
main-is: test-pandoc.hs
|
main-is: test-pandoc.hs
|
||||||
hs-source-dirs: test
|
hs-source-dirs: test,
|
||||||
build-depends: base >= 4.8 && < 5,
|
prelude
|
||||||
|
build-depends: base-noprelude >= 4.8 && < 5,
|
||||||
|
base-compat >= 0.9,
|
||||||
pandoc,
|
pandoc,
|
||||||
pandoc-types >= 1.20 && < 1.21,
|
pandoc-types >= 1.20 && < 1.21,
|
||||||
mtl >= 2.2 && < 2.3,
|
mtl >= 2.2 && < 2.3,
|
||||||
|
@ -750,11 +746,8 @@ test-suite test-pandoc
|
||||||
xml >= 1.3.12 && < 1.4,
|
xml >= 1.3.12 && < 1.4,
|
||||||
doctemplates >= 0.8 && < 0.9,
|
doctemplates >= 0.8 && < 0.9,
|
||||||
Glob >= 0.7 && < 0.11
|
Glob >= 0.7 && < 0.11
|
||||||
if impl(ghc < 8.4)
|
other-modules: Prelude
|
||||||
hs-source-dirs: prelude
|
Tests.Old
|
||||||
other-modules: Prelude
|
|
||||||
build-depends: base-compat >= 0.9
|
|
||||||
other-modules: Tests.Old
|
|
||||||
Tests.Command
|
Tests.Command
|
||||||
Tests.Helpers
|
Tests.Helpers
|
||||||
Tests.Lua
|
Tests.Lua
|
||||||
|
@ -809,7 +802,6 @@ test-suite test-pandoc
|
||||||
if os(windows)
|
if os(windows)
|
||||||
cpp-options: -D_WINDOWS
|
cpp-options: -D_WINDOWS
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
other-extensions: NoImplicitPrelude
|
|
||||||
ghc-options: -rtsopts -with-rtsopts=-K16m -threaded
|
ghc-options: -rtsopts -with-rtsopts=-K16m -threaded
|
||||||
-Wall -fno-warn-unused-do-bind
|
-Wall -fno-warn-unused-do-bind
|
||||||
-Wincomplete-record-updates
|
-Wincomplete-record-updates
|
||||||
|
@ -826,19 +818,17 @@ test-suite test-pandoc
|
||||||
benchmark benchmark-pandoc
|
benchmark benchmark-pandoc
|
||||||
type: exitcode-stdio-1.0
|
type: exitcode-stdio-1.0
|
||||||
main-is: benchmark-pandoc.hs
|
main-is: benchmark-pandoc.hs
|
||||||
hs-source-dirs: benchmark
|
hs-source-dirs: benchmark,
|
||||||
|
prelude
|
||||||
build-depends: pandoc,
|
build-depends: pandoc,
|
||||||
time, bytestring, containers,
|
time, bytestring, containers,
|
||||||
base >= 4.8 && < 5,
|
base-noprelude >= 4.8 && < 5,
|
||||||
|
base-compat >= 0.9,
|
||||||
text >= 1.1.1.0 && < 1.3,
|
text >= 1.1.1.0 && < 1.3,
|
||||||
mtl >= 2.2 && < 2.3,
|
mtl >= 2.2 && < 2.3,
|
||||||
criterion >= 1.0 && < 1.6
|
criterion >= 1.0 && < 1.6
|
||||||
if impl(ghc < 8.4)
|
|
||||||
hs-source-dirs: prelude
|
|
||||||
other-modules: Prelude
|
|
||||||
build-depends: base-compat >= 0.9
|
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
other-extensions: NoImplicitPrelude
|
other-modules: Prelude
|
||||||
ghc-options: -rtsopts -with-rtsopts=-K16m -threaded
|
ghc-options: -rtsopts -with-rtsopts=-K16m -threaded
|
||||||
-Wall -fno-warn-unused-do-bind
|
-Wall -fno-warn-unused-do-bind
|
||||||
-Wincomplete-record-updates
|
-Wincomplete-record-updates
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
{-# LANGUAGE NoImplicitPrelude #-}
|
||||||
{-# LANGUAGE PackageImports #-}
|
|
||||||
{-# LANGUAGE CPP #-}
|
|
||||||
|
|
||||||
-- The intent is that this Prelude provide the API of
|
-- The intent is that this Prelude provide the API of
|
||||||
-- the base 4.11 Prelude in a way that is portable for
|
-- the base 4.11 Prelude in a way that is portable for
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{-# LANGUAGE CPP #-}
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE ScopedTypeVariables #-}
|
{-# LANGUAGE ScopedTypeVariables #-}
|
||||||
|
@ -23,7 +22,6 @@ module Text.Pandoc.App (
|
||||||
, options
|
, options
|
||||||
, applyFilters
|
, applyFilters
|
||||||
) where
|
) where
|
||||||
import Prelude
|
|
||||||
import qualified Control.Exception as E
|
import qualified Control.Exception as E
|
||||||
import Control.Monad
|
import Control.Monad
|
||||||
import Control.Monad.Trans
|
import Control.Monad.Trans
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE CPP #-}
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE ScopedTypeVariables #-}
|
{-# LANGUAGE ScopedTypeVariables #-}
|
||||||
{-# LANGUAGE TupleSections #-}
|
{-# LANGUAGE TupleSections #-}
|
||||||
|
@ -22,7 +21,6 @@ module Text.Pandoc.App.CommandLineOptions (
|
||||||
, lookupHighlightStyle
|
, lookupHighlightStyle
|
||||||
, setVariable
|
, setVariable
|
||||||
) where
|
) where
|
||||||
import Prelude
|
|
||||||
import Control.Monad
|
import Control.Monad
|
||||||
import Control.Monad.Trans
|
import Control.Monad.Trans
|
||||||
import Control.Monad.Except (throwError)
|
import Control.Monad.Except (throwError)
|
||||||
|
@ -32,7 +30,7 @@ import Data.Bifunctor (second)
|
||||||
import Data.Char (toLower)
|
import Data.Char (toLower)
|
||||||
import Data.List (intercalate, sort)
|
import Data.List (intercalate, sort)
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
#if MIN_VERSION_base(4,12,0)
|
#if MIN_VERSION_base_noprelude(4,12,0)
|
||||||
import Data.List (isPrefixOf)
|
import Data.List (isPrefixOf)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -1030,7 +1028,7 @@ setVariable key val (Context ctx) = Context $ M.alter go key ctx
|
||||||
-- beginning with \\ to \\?\UNC\. -- See #5127.
|
-- beginning with \\ to \\?\UNC\. -- See #5127.
|
||||||
normalizePath :: FilePath -> FilePath
|
normalizePath :: FilePath -> FilePath
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
#if MIN_VERSION_base(4,12,0)
|
#if MIN_VERSION_base_noprelude(4,12,0)
|
||||||
normalizePath fp =
|
normalizePath fp =
|
||||||
if "\\\\" `isPrefixOf` fp && not ("\\\\?\\" `isPrefixOf` fp)
|
if "\\\\" `isPrefixOf` fp && not ("\\\\?\\" `isPrefixOf` fp)
|
||||||
then "\\\\?\\UNC\\" ++ drop 2 fp
|
then "\\\\?\\UNC\\" ++ drop 2 fp
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.App.FormatHeuristics
|
Module : Text.Pandoc.App.FormatHeuristics
|
||||||
|
@ -15,7 +14,6 @@ module Text.Pandoc.App.FormatHeuristics
|
||||||
( formatFromFilePaths
|
( formatFromFilePaths
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Data.Char (toLower)
|
import Data.Char (toLower)
|
||||||
import Data.Text (Text)
|
import Data.Text (Text)
|
||||||
import System.FilePath (takeExtension)
|
import System.FilePath (takeExtension)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{-# LANGUAGE ScopedTypeVariables #-}
|
{-# LANGUAGE ScopedTypeVariables #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE CPP #-}
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE DeriveGeneric #-}
|
{-# LANGUAGE DeriveGeneric #-}
|
||||||
{-# LANGUAGE TemplateHaskell #-}
|
{-# LANGUAGE TemplateHaskell #-}
|
||||||
|
@ -23,7 +22,6 @@ module Text.Pandoc.App.Opt (
|
||||||
, defaultOpts
|
, defaultOpts
|
||||||
, addMeta
|
, addMeta
|
||||||
) where
|
) where
|
||||||
import Prelude
|
|
||||||
import Data.Char (isLower, toLower)
|
import Data.Char (isLower, toLower)
|
||||||
import GHC.Generics hiding (Meta)
|
import GHC.Generics hiding (Meta)
|
||||||
import Text.Pandoc.Builder (setMeta)
|
import Text.Pandoc.Builder (setMeta)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{-# LANGUAGE CPP #-}
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE FlexibleContexts #-}
|
{-# LANGUAGE FlexibleContexts #-}
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{-# LANGUAGE ScopedTypeVariables #-}
|
{-# LANGUAGE ScopedTypeVariables #-}
|
||||||
{-# LANGUAGE TupleSections #-}
|
{-# LANGUAGE TupleSections #-}
|
||||||
|
@ -19,7 +18,6 @@ module Text.Pandoc.App.OutputSettings
|
||||||
( OutputSettings (..)
|
( OutputSettings (..)
|
||||||
, optToOutputSettings
|
, optToOutputSettings
|
||||||
) where
|
) where
|
||||||
import Prelude
|
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
import Text.DocTemplates (toVal, Context(..), Val(..))
|
import Text.DocTemplates (toVal, Context(..), Val(..))
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Asciify
|
Module : Text.Pandoc.Asciify
|
||||||
Copyright : Copyright (C) 2013-2020 John MacFarlane
|
Copyright : Copyright (C) 2013-2020 John MacFarlane
|
||||||
|
@ -13,7 +12,6 @@ ascii equivalents (used in constructing HTML identifiers).
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.Asciify (toAsciiChar)
|
module Text.Pandoc.Asciify (toAsciiChar)
|
||||||
where
|
where
|
||||||
import Prelude
|
|
||||||
import Data.Char (isAscii)
|
import Data.Char (isAscii)
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.BCP47
|
Module : Text.Pandoc.BCP47
|
||||||
Copyright : Copyright (C) 2017–2020 John MacFarlane
|
Copyright : Copyright (C) 2017–2020 John MacFarlane
|
||||||
|
@ -18,7 +17,6 @@ module Text.Pandoc.BCP47 (
|
||||||
, renderLang
|
, renderLang
|
||||||
)
|
)
|
||||||
where
|
where
|
||||||
import Prelude
|
|
||||||
import Control.Monad (guard)
|
import Control.Monad (guard)
|
||||||
import Data.Char (isAlphaNum, isAscii, isLetter, isLower, isUpper)
|
import Data.Char (isAlphaNum, isAscii, isLetter, isLower, isUpper)
|
||||||
import Text.Pandoc.Definition
|
import Text.Pandoc.Definition
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.CSS
|
Module : Text.Pandoc.CSS
|
||||||
Copyright : © 2006-2020 John MacFarlane <jgm@berkeley.edu>,
|
Copyright : © 2006-2020 John MacFarlane <jgm@berkeley.edu>,
|
||||||
|
@ -18,7 +17,6 @@ module Text.Pandoc.CSS ( foldOrElse
|
||||||
)
|
)
|
||||||
where
|
where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
import Text.Pandoc.Shared (trim)
|
import Text.Pandoc.Shared (trim)
|
||||||
import Text.Parsec
|
import Text.Parsec
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.CSV
|
Module : Text.Pandoc.CSV
|
||||||
Copyright : Copyright (C) 2017–2020 John MacFarlane <jgm@berkeley.edu>
|
Copyright : Copyright (C) 2017–2020 John MacFarlane <jgm@berkeley.edu>
|
||||||
|
@ -17,7 +16,6 @@ module Text.Pandoc.CSV (
|
||||||
ParseError
|
ParseError
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Monad (unless, void)
|
import Control.Monad (unless, void)
|
||||||
import Data.Text (Text)
|
import Data.Text (Text)
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE CPP #-}
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE PatternGuards #-}
|
{-# LANGUAGE PatternGuards #-}
|
||||||
{-# LANGUAGE DeriveFunctor #-}
|
{-# LANGUAGE DeriveFunctor #-}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE CPP #-}
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE FlexibleContexts #-}
|
{-# LANGUAGE FlexibleContexts #-}
|
||||||
{-# LANGUAGE FlexibleInstances #-}
|
{-# LANGUAGE FlexibleInstances #-}
|
||||||
|
@ -53,7 +52,6 @@ module Text.Pandoc.Class.PandocMonad
|
||||||
, makeCanonical
|
, makeCanonical
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Codec.Archive.Zip
|
import Codec.Archive.Zip
|
||||||
import Control.Monad.Except (MonadError (catchError, throwError),
|
import Control.Monad.Except (MonadError (catchError, throwError),
|
||||||
MonadTrans, lift, when)
|
MonadTrans, lift, when)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE TemplateHaskell #-}
|
{-# LANGUAGE TemplateHaskell #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Data
|
Module : Text.Pandoc.Data
|
||||||
|
@ -13,7 +12,6 @@ Provide contents data files as Haskell values.
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.Data (dataFiles) where
|
module Text.Pandoc.Data (dataFiles) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import qualified Data.ByteString as B
|
import qualified Data.ByteString as B
|
||||||
import Data.FileEmbed
|
import Data.FileEmbed
|
||||||
import System.FilePath (splitDirectories)
|
import System.FilePath (splitDirectories)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Emoji
|
Module : Text.Pandoc.Emoji
|
||||||
|
@ -12,7 +11,6 @@
|
||||||
Emoji symbol lookup from canonical string identifier.
|
Emoji symbol lookup from canonical string identifier.
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.Emoji ( emojis, emojiToInline ) where
|
module Text.Pandoc.Emoji ( emojis, emojiToInline ) where
|
||||||
import Prelude
|
|
||||||
import qualified Text.Emoji as E
|
import qualified Text.Emoji as E
|
||||||
import Text.Pandoc.Definition (Inline (Span, Str))
|
import Text.Pandoc.Definition (Inline (Span, Str))
|
||||||
import Data.Text (Text)
|
import Data.Text (Text)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE DeriveDataTypeable #-}
|
{-# LANGUAGE DeriveDataTypeable #-}
|
||||||
{-# LANGUAGE DeriveGeneric #-}
|
{-# LANGUAGE DeriveGeneric #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
@ -19,7 +18,6 @@ module Text.Pandoc.Error (
|
||||||
PandocError(..),
|
PandocError(..),
|
||||||
handleError) where
|
handleError) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Exception (Exception)
|
import Control.Exception (Exception)
|
||||||
import Data.Typeable (Typeable)
|
import Data.Typeable (Typeable)
|
||||||
import Data.Word (Word8)
|
import Data.Word (Word8)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{-# LANGUAGE CPP #-}
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE DeriveDataTypeable #-}
|
{-# LANGUAGE DeriveDataTypeable #-}
|
||||||
{-# LANGUAGE DeriveGeneric #-}
|
{-# LANGUAGE DeriveGeneric #-}
|
||||||
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
||||||
|
@ -33,7 +32,6 @@ module Text.Pandoc.Extensions ( Extension(..)
|
||||||
, githubMarkdownExtensions
|
, githubMarkdownExtensions
|
||||||
, multimarkdownExtensions )
|
, multimarkdownExtensions )
|
||||||
where
|
where
|
||||||
import Prelude
|
|
||||||
import Data.Bits (clearBit, setBit, testBit, (.|.))
|
import Data.Bits (clearBit, setBit, testBit, (.|.))
|
||||||
import Data.Data (Data)
|
import Data.Data (Data)
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{-# LANGUAGE CPP #-}
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE DeriveGeneric #-}
|
{-# LANGUAGE DeriveGeneric #-}
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE TemplateHaskell #-}
|
{-# LANGUAGE TemplateHaskell #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
|
@ -19,7 +18,6 @@ module Text.Pandoc.Filter
|
||||||
, applyFilters
|
, applyFilters
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import System.CPUTime (getCPUTime)
|
import System.CPUTime (getCPUTime)
|
||||||
import Data.Aeson.TH (deriveJSON, defaultOptions)
|
import Data.Aeson.TH (deriveJSON, defaultOptions)
|
||||||
import GHC.Generics (Generic)
|
import GHC.Generics (Generic)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Filter
|
Module : Text.Pandoc.Filter
|
||||||
|
@ -13,7 +12,6 @@ Programmatically modifications of pandoc documents via JSON filters.
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.Filter.JSON (apply) where
|
module Text.Pandoc.Filter.JSON (apply) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Monad (unless, when)
|
import Control.Monad (unless, when)
|
||||||
import Control.Monad.Trans (MonadIO (liftIO))
|
import Control.Monad.Trans (MonadIO (liftIO))
|
||||||
import Data.Aeson (eitherDecode', encode)
|
import Data.Aeson (eitherDecode', encode)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Filter.Lua
|
Module : Text.Pandoc.Filter.Lua
|
||||||
Copyright : Copyright (C) 2006-2020 John MacFarlane
|
Copyright : Copyright (C) 2006-2020 John MacFarlane
|
||||||
|
@ -12,7 +11,6 @@ Apply Lua filters to modify a pandoc documents programmatically.
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.Filter.Lua (apply) where
|
module Text.Pandoc.Filter.Lua (apply) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Exception (throw)
|
import Control.Exception (throw)
|
||||||
import Control.Monad ((>=>))
|
import Control.Monad ((>=>))
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Filter.Path
|
Module : Text.Pandoc.Filter.Path
|
||||||
Copyright : Copyright (C) 2006-2020 John MacFarlane
|
Copyright : Copyright (C) 2006-2020 John MacFarlane
|
||||||
|
@ -14,7 +13,6 @@ module Text.Pandoc.Filter.Path
|
||||||
( expandFilterPath
|
( expandFilterPath
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Text.Pandoc.Class (PandocMonad, fileExists, getUserDataDir)
|
import Text.Pandoc.Class (PandocMonad, fileExists, getUserDataDir)
|
||||||
import System.FilePath ((</>), isRelative)
|
import System.FilePath ((</>), isRelative)
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Highlighting
|
Module : Text.Pandoc.Highlighting
|
||||||
|
@ -34,7 +33,6 @@ module Text.Pandoc.Highlighting ( highlightingStyles
|
||||||
, fromListingsLanguage
|
, fromListingsLanguage
|
||||||
, toListingsLanguage
|
, toListingsLanguage
|
||||||
) where
|
) where
|
||||||
import Prelude
|
|
||||||
import Control.Monad
|
import Control.Monad
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
import Data.Maybe (fromMaybe)
|
import Data.Maybe (fromMaybe)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, CPP #-}
|
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, CPP #-}
|
||||||
{-# LANGUAGE ViewPatterns #-}
|
{-# LANGUAGE ViewPatterns #-}
|
||||||
{- |
|
{- |
|
||||||
|
@ -13,7 +12,6 @@ Portability : portable
|
||||||
Functions for converting images.
|
Functions for converting images.
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.Image ( svgToPng ) where
|
module Text.Pandoc.Image ( svgToPng ) where
|
||||||
import Prelude
|
|
||||||
import Text.Pandoc.Options (WriterOptions(..))
|
import Text.Pandoc.Options (WriterOptions(..))
|
||||||
import Text.Pandoc.Process (pipeProcess)
|
import Text.Pandoc.Process (pipeProcess)
|
||||||
import qualified Data.ByteString.Lazy as L
|
import qualified Data.ByteString.Lazy as L
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, CPP #-}
|
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, CPP #-}
|
||||||
{-# LANGUAGE ViewPatterns #-}
|
{-# LANGUAGE ViewPatterns #-}
|
||||||
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
|
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
|
||||||
|
@ -33,7 +32,6 @@ module Text.Pandoc.ImageSize ( ImageType(..)
|
||||||
, showInPixel
|
, showInPixel
|
||||||
, showFl
|
, showFl
|
||||||
) where
|
) where
|
||||||
import Prelude
|
|
||||||
import Data.ByteString (ByteString, unpack)
|
import Data.ByteString (ByteString, unpack)
|
||||||
import qualified Data.ByteString.Char8 as B
|
import qualified Data.ByteString.Char8 as B
|
||||||
import qualified Data.ByteString.Lazy as BL
|
import qualified Data.ByteString.Lazy as BL
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE DeriveDataTypeable #-}
|
{-# LANGUAGE DeriveDataTypeable #-}
|
||||||
{-# LANGUAGE DeriveGeneric #-}
|
{-# LANGUAGE DeriveGeneric #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
@ -23,7 +22,6 @@ module Text.Pandoc.Logging (
|
||||||
, messageVerbosity
|
, messageVerbosity
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Monad (mzero)
|
import Control.Monad (mzero)
|
||||||
import Data.YAML (withStr, FromYAML(..))
|
import Data.YAML (withStr, FromYAML(..))
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Lua
|
Module : Text.Pandoc.Lua
|
||||||
Copyright : Copyright © 2017–2020 Albert Krewinkel
|
Copyright : Copyright © 2017–2020 Albert Krewinkel
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{-# LANGUAGE FlexibleContexts #-}
|
{-# LANGUAGE FlexibleContexts #-}
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Lua.Filter
|
Module : Text.Pandoc.Lua.Filter
|
||||||
Copyright : © 2012–2020 John MacFarlane,
|
Copyright : © 2012–2020 John MacFarlane,
|
||||||
|
@ -17,7 +16,6 @@ module Text.Pandoc.Lua.Filter ( LuaFilterFunction
|
||||||
, walkBlocks
|
, walkBlocks
|
||||||
, module Text.Pandoc.Lua.Walk
|
, module Text.Pandoc.Lua.Walk
|
||||||
) where
|
) where
|
||||||
import Prelude
|
|
||||||
import Control.Applicative ((<|>))
|
import Control.Applicative ((<|>))
|
||||||
import Control.Monad (mplus, (>=>))
|
import Control.Monad (mplus, (>=>))
|
||||||
import Control.Monad.Catch (finally)
|
import Control.Monad.Catch (finally)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{-# LANGUAGE DeriveDataTypeable #-}
|
{-# LANGUAGE DeriveDataTypeable #-}
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Lua
|
Module : Text.Pandoc.Lua
|
||||||
Copyright : Copyright © 2017-2020 Albert Krewinkel
|
Copyright : Copyright © 2017-2020 Albert Krewinkel
|
||||||
|
@ -15,7 +14,6 @@ module Text.Pandoc.Lua.Global
|
||||||
, setGlobals
|
, setGlobals
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Data.Data (Data)
|
import Data.Data (Data)
|
||||||
import Foreign.Lua (Lua, Peekable, Pushable)
|
import Foreign.Lua (Lua, Peekable, Pushable)
|
||||||
import Foreign.Lua.Userdata ( ensureUserdataMetatable, pushAnyWithMetatable
|
import Foreign.Lua.Userdata ( ensureUserdataMetatable, pushAnyWithMetatable
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Lua
|
Module : Text.Pandoc.Lua
|
||||||
Copyright : Copyright © 2017-2020 Albert Krewinkel
|
Copyright : Copyright © 2017-2020 Albert Krewinkel
|
||||||
|
@ -16,7 +15,6 @@ module Text.Pandoc.Lua.Init
|
||||||
, luaPackageParams
|
, luaPackageParams
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Monad.Trans (MonadIO (..))
|
import Control.Monad.Trans (MonadIO (..))
|
||||||
import Data.Data (Data, dataTypeConstrs, dataTypeOf, showConstr)
|
import Data.Data (Data, dataTypeConstrs, dataTypeOf, showConstr)
|
||||||
import Foreign.Lua (Lua)
|
import Foreign.Lua (Lua)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE LambdaCase #-}
|
{-# LANGUAGE LambdaCase #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Lua.Marshaling.AST
|
Module : Text.Pandoc.Lua.Marshaling.AST
|
||||||
|
@ -17,7 +16,6 @@ module Text.Pandoc.Lua.Marshaling.AST
|
||||||
, LuaListAttributes (..)
|
, LuaListAttributes (..)
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Applicative ((<|>))
|
import Control.Applicative ((<|>))
|
||||||
import Foreign.Lua (Lua, Peekable, Pushable, StackIndex)
|
import Foreign.Lua (Lua, Peekable, Pushable, StackIndex)
|
||||||
import Text.Pandoc.Definition
|
import Text.Pandoc.Definition
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Lua.Marshaling.AnyValue
|
Module : Text.Pandoc.Lua.Marshaling.AnyValue
|
||||||
Copyright : © 2017-2020 Albert Krewinkel
|
Copyright : © 2017-2020 Albert Krewinkel
|
||||||
|
@ -15,7 +14,6 @@ into HsLua.
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.Lua.Marshaling.AnyValue (AnyValue (..)) where
|
module Text.Pandoc.Lua.Marshaling.AnyValue (AnyValue (..)) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Foreign.Lua (Peekable (peek), StackIndex)
|
import Foreign.Lua (Peekable (peek), StackIndex)
|
||||||
|
|
||||||
-- | Dummy type to allow values of arbitrary Lua type. This just wraps
|
-- | Dummy type to allow values of arbitrary Lua type. This just wraps
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
{-# LANGUAGE LambdaCase #-}
|
{-# LANGUAGE LambdaCase #-}
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Lua.Marshaling.CommonState
|
Module : Text.Pandoc.Lua.Marshaling.CommonState
|
||||||
|
@ -14,7 +13,6 @@ Instances to marshal (push) and unmarshal (peek) the common state.
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.Lua.Marshaling.CommonState () where
|
module Text.Pandoc.Lua.Marshaling.CommonState () where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Foreign.Lua (Lua, Peekable, Pushable)
|
import Foreign.Lua (Lua, Peekable, Pushable)
|
||||||
import Foreign.Lua.Types.Peekable (reportValueOnFailure)
|
import Foreign.Lua.Types.Peekable (reportValueOnFailure)
|
||||||
import Foreign.Lua.Userdata (ensureUserdataMetatable, pushAnyWithMetatable,
|
import Foreign.Lua.Userdata (ensureUserdataMetatable, pushAnyWithMetatable,
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Lua.Marshaling.Context
|
Module : Text.Pandoc.Lua.Marshaling.Context
|
||||||
|
@ -13,7 +12,6 @@ Marshaling instance for doctemplates Context and its components.
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.Lua.Marshaling.Context () where
|
module Text.Pandoc.Lua.Marshaling.Context () where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import qualified Foreign.Lua as Lua
|
import qualified Foreign.Lua as Lua
|
||||||
import Foreign.Lua (Pushable)
|
import Foreign.Lua (Pushable)
|
||||||
import Text.DocTemplates (Context(..), Val(..), TemplateTarget)
|
import Text.DocTemplates (Context(..), Val(..), TemplateTarget)
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{-# LANGUAGE DeriveDataTypeable #-}
|
{-# LANGUAGE DeriveDataTypeable #-}
|
||||||
{-# LANGUAGE FlexibleInstances #-}
|
{-# LANGUAGE FlexibleInstances #-}
|
||||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE UndecidableInstances #-}
|
{-# LANGUAGE UndecidableInstances #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Lua.Marshaling.List
|
Module : Text.Pandoc.Lua.Marshaling.List
|
||||||
|
@ -17,7 +16,6 @@ module Text.Pandoc.Lua.Marshaling.List
|
||||||
( List (..)
|
( List (..)
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Data.Data (Data)
|
import Data.Data (Data)
|
||||||
import Foreign.Lua (Peekable, Pushable)
|
import Foreign.Lua (Peekable, Pushable)
|
||||||
import Text.Pandoc.Walk (Walkable (..))
|
import Text.Pandoc.Walk (Walkable (..))
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Lua.Marshaling.MediaBag
|
Module : Text.Pandoc.Lua.Marshaling.MediaBag
|
||||||
Copyright : © 2012-2020 John MacFarlane
|
Copyright : © 2012-2020 John MacFarlane
|
||||||
|
@ -11,7 +10,6 @@ Instances to marshal (push) and unmarshal (peek) media data.
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.Lua.Marshaling.MediaBag (pushIterator) where
|
module Text.Pandoc.Lua.Marshaling.MediaBag (pushIterator) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Foreign.Ptr (Ptr)
|
import Foreign.Ptr (Ptr)
|
||||||
import Foreign.StablePtr (StablePtr, deRefStablePtr, newStablePtr)
|
import Foreign.StablePtr (StablePtr, deRefStablePtr, newStablePtr)
|
||||||
import Foreign.Lua (Lua, NumResults, Peekable, Pushable, StackIndex)
|
import Foreign.Lua (Lua, NumResults, Peekable, Pushable, StackIndex)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{-# LANGUAGE LambdaCase #-}
|
{-# LANGUAGE LambdaCase #-}
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{-# LANGUAGE ScopedTypeVariables #-}
|
{-# LANGUAGE ScopedTypeVariables #-}
|
||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
|
@ -16,7 +15,6 @@ Marshaling instance for ReaderOptions and its components.
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.Lua.Marshaling.ReaderOptions () where
|
module Text.Pandoc.Lua.Marshaling.ReaderOptions () where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Data.Data (showConstr, toConstr)
|
import Data.Data (showConstr, toConstr)
|
||||||
import Foreign.Lua (Lua, Pushable)
|
import Foreign.Lua (Lua, Pushable)
|
||||||
import Text.Pandoc.Extensions (Extensions)
|
import Text.Pandoc.Extensions (Extensions)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
{-# LANGUAGE LambdaCase #-}
|
{-# LANGUAGE LambdaCase #-}
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{-# LANGUAGE ScopedTypeVariables #-}
|
{-# LANGUAGE ScopedTypeVariables #-}
|
||||||
{- |
|
{- |
|
||||||
|
@ -20,7 +19,6 @@ module Text.Pandoc.Lua.Marshaling.Version
|
||||||
)
|
)
|
||||||
where
|
where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Data.Text (Text)
|
import Data.Text (Text)
|
||||||
import Data.Maybe (fromMaybe)
|
import Data.Maybe (fromMaybe)
|
||||||
import Data.Version (Version (..), makeVersion, parseVersion, showVersion)
|
import Data.Version (Version (..), makeVersion, parseVersion, showVersion)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Lua.Module.MediaBag
|
Module : Text.Pandoc.Lua.Module.MediaBag
|
||||||
|
@ -14,7 +13,6 @@ module Text.Pandoc.Lua.Module.MediaBag
|
||||||
( pushModule
|
( pushModule
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Monad (zipWithM_)
|
import Control.Monad (zipWithM_)
|
||||||
import Foreign.Lua (Lua, NumResults, Optional, liftIO)
|
import Foreign.Lua (Lua, NumResults, Optional, liftIO)
|
||||||
import Text.Pandoc.Class (CommonState (..), fetchItem, putCommonState,
|
import Text.Pandoc.Class (CommonState (..), fetchItem, putCommonState,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{-# LANGUAGE FlexibleContexts #-}
|
{-# LANGUAGE FlexibleContexts #-}
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Lua.Module.Pandoc
|
Module : Text.Pandoc.Lua.Module.Pandoc
|
||||||
|
@ -15,7 +14,6 @@ module Text.Pandoc.Lua.Module.Pandoc
|
||||||
( pushModule
|
( pushModule
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Monad (when)
|
import Control.Monad (when)
|
||||||
import Control.Monad.Except (throwError)
|
import Control.Monad.Except (throwError)
|
||||||
import Data.Default (Default (..))
|
import Data.Default (Default (..))
|
||||||
|
|
|
@ -12,7 +12,6 @@ module Text.Pandoc.Lua.Module.System
|
||||||
( pushModule
|
( pushModule
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Foreign.Lua (Lua, NumResults)
|
import Foreign.Lua (Lua, NumResults)
|
||||||
import Foreign.Lua.Module.System (arch, env, getwd, os,
|
import Foreign.Lua.Module.System (arch, env, getwd, os,
|
||||||
with_env, with_tmpdir, with_wd)
|
with_env, with_tmpdir, with_wd)
|
||||||
|
|
|
@ -12,7 +12,6 @@ module Text.Pandoc.Lua.Module.Types
|
||||||
( pushModule
|
( pushModule
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Data.Version (Version)
|
import Data.Version (Version)
|
||||||
import Foreign.Lua (Lua, NumResults)
|
import Foreign.Lua (Lua, NumResults)
|
||||||
import Text.Pandoc.Definition
|
import Text.Pandoc.Definition
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Lua.Module.Utils
|
Module : Text.Pandoc.Lua.Module.Utils
|
||||||
Copyright : Copyright © 2017-2020 Albert Krewinkel
|
Copyright : Copyright © 2017-2020 Albert Krewinkel
|
||||||
|
@ -13,7 +12,6 @@ module Text.Pandoc.Lua.Module.Utils
|
||||||
( pushModule
|
( pushModule
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Applicative ((<|>))
|
import Control.Applicative ((<|>))
|
||||||
import Data.Default (def)
|
import Data.Default (def)
|
||||||
import Data.Version (Version)
|
import Data.Version (Version)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{-# LANGUAGE FlexibleContexts #-}
|
{-# LANGUAGE FlexibleContexts #-}
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE ScopedTypeVariables #-}
|
{-# LANGUAGE ScopedTypeVariables #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Lua.Packages
|
Module : Text.Pandoc.Lua.Packages
|
||||||
|
@ -16,7 +15,6 @@ module Text.Pandoc.Lua.Packages
|
||||||
, installPandocPackageSearcher
|
, installPandocPackageSearcher
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Monad (forM_)
|
import Control.Monad (forM_)
|
||||||
import Data.ByteString (ByteString)
|
import Data.ByteString (ByteString)
|
||||||
import Foreign.Lua (Lua, NumResults, liftIO)
|
import Foreign.Lua (Lua, NumResults, liftIO)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{-# LANGUAGE FlexibleInstances #-}
|
{-# LANGUAGE FlexibleInstances #-}
|
||||||
{-# LANGUAGE LambdaCase #-}
|
{-# LANGUAGE LambdaCase #-}
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Lua.Util
|
Module : Text.Pandoc.Lua.Util
|
||||||
|
@ -27,7 +26,6 @@ module Text.Pandoc.Lua.Util
|
||||||
, dofileWithTraceback
|
, dofileWithTraceback
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Monad (unless, when)
|
import Control.Monad (unless, when)
|
||||||
import Foreign.Lua ( Lua, NumArgs, NumResults, Peekable, Pushable, StackIndex
|
import Foreign.Lua ( Lua, NumArgs, NumResults, Peekable, Pushable, StackIndex
|
||||||
, Status, ToHaskellFunction )
|
, Status, ToHaskellFunction )
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{-# LANGUAGE DeriveTraversable #-}
|
{-# LANGUAGE DeriveTraversable #-}
|
||||||
{-# LANGUAGE FlexibleContexts #-}
|
{-# LANGUAGE FlexibleContexts #-}
|
||||||
{-# LANGUAGE FlexibleInstances #-}
|
{-# LANGUAGE FlexibleInstances #-}
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Lua.Walk
|
Module : Text.Pandoc.Lua.Walk
|
||||||
|
@ -18,7 +17,6 @@ module Text.Pandoc.Lua.Walk
|
||||||
)
|
)
|
||||||
where
|
where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Monad ((<=<))
|
import Control.Monad ((<=<))
|
||||||
import Text.Pandoc.Definition
|
import Text.Pandoc.Definition
|
||||||
import Text.Pandoc.Walk
|
import Text.Pandoc.Walk
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.MIME
|
Module : Text.Pandoc.MIME
|
||||||
|
@ -13,7 +12,6 @@ Mime type lookup.
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.MIME ( MimeType, getMimeType, getMimeTypeDef,
|
module Text.Pandoc.MIME ( MimeType, getMimeType, getMimeTypeDef,
|
||||||
extensionFromMimeType, mediaCategory ) where
|
extensionFromMimeType, mediaCategory ) where
|
||||||
import Prelude
|
|
||||||
import Data.List (isPrefixOf, isSuffixOf)
|
import Data.List (isPrefixOf, isSuffixOf)
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE CPP #-}
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE DeriveDataTypeable #-}
|
{-# LANGUAGE DeriveDataTypeable #-}
|
||||||
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
||||||
|
@ -22,7 +21,6 @@ module Text.Pandoc.MediaBag (
|
||||||
mediaDirectory,
|
mediaDirectory,
|
||||||
mediaItems
|
mediaItems
|
||||||
) where
|
) where
|
||||||
import Prelude
|
|
||||||
import qualified Data.ByteString.Lazy as BL
|
import qualified Data.ByteString.Lazy as BL
|
||||||
import Data.Data (Data)
|
import Data.Data (Data)
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{-# LANGUAGE CPP #-}
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE DeriveDataTypeable #-}
|
{-# LANGUAGE DeriveDataTypeable #-}
|
||||||
{-# LANGUAGE DeriveGeneric #-}
|
{-# LANGUAGE DeriveGeneric #-}
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE TemplateHaskell #-}
|
{-# LANGUAGE TemplateHaskell #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
|
@ -33,7 +32,6 @@ module Text.Pandoc.Options ( module Text.Pandoc.Extensions
|
||||||
, defaultMathJaxURL
|
, defaultMathJaxURL
|
||||||
, defaultKaTeXURL
|
, defaultKaTeXURL
|
||||||
) where
|
) where
|
||||||
import Prelude
|
|
||||||
import Control.Applicative ((<|>))
|
import Control.Applicative ((<|>))
|
||||||
import Data.Char (toLower)
|
import Data.Char (toLower)
|
||||||
import Data.Maybe (fromMaybe)
|
import Data.Maybe (fromMaybe)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE CPP #-}
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{-# LANGUAGE ScopedTypeVariables #-}
|
{-# LANGUAGE ScopedTypeVariables #-}
|
||||||
|
@ -15,7 +14,6 @@ Conversion of LaTeX documents to PDF.
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.PDF ( makePDF ) where
|
module Text.Pandoc.PDF ( makePDF ) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import qualified Codec.Picture as JP
|
import qualified Codec.Picture as JP
|
||||||
import qualified Control.Exception as E
|
import qualified Control.Exception as E
|
||||||
import Control.Monad (when)
|
import Control.Monad (when)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE CPP #-}
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE ExplicitForAll #-}
|
{-# LANGUAGE ExplicitForAll #-}
|
||||||
{-# LANGUAGE FlexibleContexts #-}
|
{-# LANGUAGE FlexibleContexts #-}
|
||||||
|
@ -186,7 +185,6 @@ module Text.Pandoc.Parsing ( take1WhileP,
|
||||||
)
|
)
|
||||||
where
|
where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Monad.Identity
|
import Control.Monad.Identity
|
||||||
import Control.Monad.Reader
|
import Control.Monad.Reader
|
||||||
import Data.Char (chr, isAlphaNum, isAscii, isAsciiUpper,
|
import Data.Char (chr, isAlphaNum, isAscii, isAsciiUpper,
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Process
|
Module : Text.Pandoc.Process
|
||||||
Copyright : Copyright (C) 2013-2020 John MacFarlane
|
Copyright : Copyright (C) 2013-2020 John MacFarlane
|
||||||
|
@ -12,7 +11,6 @@ ByteString variant of 'readProcessWithExitCode'.
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.Process (pipeProcess)
|
module Text.Pandoc.Process (pipeProcess)
|
||||||
where
|
where
|
||||||
import Prelude
|
|
||||||
import Control.Concurrent (MVar, forkIO, killThread, newEmptyMVar, putMVar,
|
import Control.Concurrent (MVar, forkIO, killThread, newEmptyMVar, putMVar,
|
||||||
takeMVar)
|
takeMVar)
|
||||||
import Control.Exception (SomeException (..))
|
import Control.Exception (SomeException (..))
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{-# LANGUAGE MonoLocalBinds #-}
|
{-# LANGUAGE MonoLocalBinds #-}
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE ScopedTypeVariables #-}
|
{-# LANGUAGE ScopedTypeVariables #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
|
@ -57,7 +56,6 @@ module Text.Pandoc.Readers
|
||||||
, getDefaultExtensions
|
, getDefaultExtensions
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Monad (unless)
|
import Control.Monad (unless)
|
||||||
import Control.Monad.Except (throwError)
|
import Control.Monad.Except (throwError)
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE FlexibleContexts #-}
|
{-# LANGUAGE FlexibleContexts #-}
|
||||||
|
|
||||||
{-# LANGUAGE ScopedTypeVariables #-}
|
{-# LANGUAGE ScopedTypeVariables #-}
|
||||||
|
@ -14,7 +13,6 @@
|
||||||
Conversion from CSV to a 'Pandoc' table.
|
Conversion from CSV to a 'Pandoc' table.
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.Readers.CSV ( readCSV ) where
|
module Text.Pandoc.Readers.CSV ( readCSV ) where
|
||||||
import Prelude
|
|
||||||
import Data.Text (Text)
|
import Data.Text (Text)
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
import Text.Pandoc.CSV (parseCSV, defaultCSVOptions)
|
import Text.Pandoc.CSV (parseCSV, defaultCSVOptions)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{-# LANGUAGE ViewPatterns #-}
|
{-# LANGUAGE ViewPatterns #-}
|
||||||
{- |
|
{- |
|
||||||
|
@ -17,7 +16,6 @@ CommonMark is a strongly specified variant of Markdown: http://commonmark.org.
|
||||||
module Text.Pandoc.Readers.CommonMark (readCommonMark)
|
module Text.Pandoc.Readers.CommonMark (readCommonMark)
|
||||||
where
|
where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import CMarkGFM
|
import CMarkGFM
|
||||||
import Control.Monad.State
|
import Control.Monad.State
|
||||||
import qualified Data.Set as Set
|
import qualified Data.Set as Set
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Readers.Creole
|
Module : Text.Pandoc.Readers.Creole
|
||||||
|
@ -14,7 +13,6 @@ Conversion of creole text to 'Pandoc' document.
|
||||||
module Text.Pandoc.Readers.Creole ( readCreole
|
module Text.Pandoc.Readers.Creole ( readCreole
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Monad.Except (guard, liftM2, throwError)
|
import Control.Monad.Except (guard, liftM2, throwError)
|
||||||
import qualified Data.Foldable as F
|
import qualified Data.Foldable as F
|
||||||
import Data.Maybe (fromMaybe)
|
import Data.Maybe (fromMaybe)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Readers.DocBook
|
Module : Text.Pandoc.Readers.DocBook
|
||||||
|
@ -12,7 +11,6 @@
|
||||||
Conversion of DocBook XML to 'Pandoc' document.
|
Conversion of DocBook XML to 'Pandoc' document.
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.Readers.DocBook ( readDocBook ) where
|
module Text.Pandoc.Readers.DocBook ( readDocBook ) where
|
||||||
import Prelude
|
|
||||||
import Control.Monad.State.Strict
|
import Control.Monad.State.Strict
|
||||||
import Data.Char (isSpace, toUpper)
|
import Data.Char (isSpace, toUpper)
|
||||||
import Data.Default
|
import Data.Default
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE CPP #-}
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{-# LANGUAGE PatternGuards #-}
|
{-# LANGUAGE PatternGuards #-}
|
||||||
|
@ -60,7 +59,6 @@ module Text.Pandoc.Readers.Docx
|
||||||
( readDocx
|
( readDocx
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Codec.Archive.Zip
|
import Codec.Archive.Zip
|
||||||
import Control.Monad.Reader
|
import Control.Monad.Reader
|
||||||
import Control.Monad.State.Strict
|
import Control.Monad.State.Strict
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE FlexibleInstances #-}
|
{-# LANGUAGE FlexibleInstances #-}
|
||||||
{-# LANGUAGE PatternGuards #-}
|
{-# LANGUAGE PatternGuards #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
@ -59,7 +58,6 @@ module Text.Pandoc.Readers.Docx.Combine ( smushInlines
|
||||||
)
|
)
|
||||||
where
|
where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Data.List
|
import Data.List
|
||||||
import Data.Sequence (ViewL (..), ViewR (..), viewl, viewr, (><), (|>))
|
import Data.Sequence (ViewL (..), ViewR (..), viewl, viewr, (><), (|>))
|
||||||
import qualified Data.Sequence as Seq (null)
|
import qualified Data.Sequence as Seq (null)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Readers.Docx.Fields
|
Module : Text.Pandoc.Readers.Docx.Fields
|
||||||
|
@ -16,7 +15,6 @@ module Text.Pandoc.Readers.Docx.Fields ( FieldInfo(..)
|
||||||
, parseFieldInfo
|
, parseFieldInfo
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Data.Functor (($>), void)
|
import Data.Functor (($>), void)
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
import Text.Parsec
|
import Text.Parsec
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Readers.Docx.Lists
|
Module : Text.Pandoc.Readers.Docx.Lists
|
||||||
|
@ -18,7 +17,6 @@ module Text.Pandoc.Readers.Docx.Lists ( blocksToBullets
|
||||||
, listParagraphStyles
|
, listParagraphStyles
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Data.List
|
import Data.List
|
||||||
import Data.Maybe
|
import Data.Maybe
|
||||||
import Data.String (fromString)
|
import Data.String (fromString)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE ViewPatterns #-}
|
{-# LANGUAGE ViewPatterns #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
|
@ -52,7 +51,6 @@ module Text.Pandoc.Readers.Docx.Parse ( Docx(..)
|
||||||
, constructBogusParStyleData
|
, constructBogusParStyleData
|
||||||
, leftBiasedMergeRunStyle
|
, leftBiasedMergeRunStyle
|
||||||
) where
|
) where
|
||||||
import Prelude
|
|
||||||
import Text.Pandoc.Readers.Docx.Parse.Styles
|
import Text.Pandoc.Readers.Docx.Parse.Styles
|
||||||
import Codec.Archive.Zip
|
import Codec.Archive.Zip
|
||||||
import Control.Applicative ((<|>))
|
import Control.Applicative ((<|>))
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE FlexibleInstances #-}
|
{-# LANGUAGE FlexibleInstances #-}
|
||||||
{-# LANGUAGE FlexibleContexts #-}
|
{-# LANGUAGE FlexibleContexts #-}
|
||||||
{-# LANGUAGE TypeFamilies #-}
|
{-# LANGUAGE TypeFamilies #-}
|
||||||
|
@ -43,7 +42,6 @@ module Text.Pandoc.Readers.Docx.Parse.Styles (
|
||||||
, defaultRunStyle
|
, defaultRunStyle
|
||||||
, checkOnOff
|
, checkOnOff
|
||||||
) where
|
) where
|
||||||
import Prelude
|
|
||||||
import Codec.Archive.Zip
|
import Codec.Archive.Zip
|
||||||
import Control.Applicative ((<|>))
|
import Control.Applicative ((<|>))
|
||||||
import Control.Monad.Except
|
import Control.Monad.Except
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Readers.Docx.StyleMaps
|
Module : Text.Pandoc.Readers.Docx.StyleMaps
|
||||||
Copyright : © 2014-2020 Jesse Rosenthal <jrosenthal@jhu.edu>,
|
Copyright : © 2014-2020 Jesse Rosenthal <jrosenthal@jhu.edu>,
|
||||||
|
@ -24,7 +23,6 @@ module Text.Pandoc.Readers.Docx.Util (
|
||||||
, findAttrTextByName
|
, findAttrTextByName
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Data.Maybe (mapMaybe)
|
import Data.Maybe (mapMaybe)
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
import Text.XML.Light
|
import Text.XML.Light
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{-# LANGUAGE FlexibleContexts #-}
|
{-# LANGUAGE FlexibleContexts #-}
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{-# LANGUAGE TupleSections #-}
|
{-# LANGUAGE TupleSections #-}
|
||||||
{-# LANGUAGE ViewPatterns #-}
|
{-# LANGUAGE ViewPatterns #-}
|
||||||
|
@ -16,7 +15,6 @@ Conversion of DokuWiki text to 'Pandoc' document.
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.Readers.DokuWiki (readDokuWiki) where
|
module Text.Pandoc.Readers.DokuWiki (readDokuWiki) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Monad
|
import Control.Monad
|
||||||
import Control.Monad.Except (throwError)
|
import Control.Monad.Except (throwError)
|
||||||
import Data.Char (isAlphaNum, isDigit)
|
import Data.Char (isAlphaNum, isDigit)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE TupleSections #-}
|
{-# LANGUAGE TupleSections #-}
|
||||||
{-# LANGUAGE ViewPatterns #-}
|
{-# LANGUAGE ViewPatterns #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
@ -18,7 +17,6 @@ module Text.Pandoc.Readers.EPUB
|
||||||
(readEPUB)
|
(readEPUB)
|
||||||
where
|
where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Codec.Archive.Zip (Archive (..), Entry, findEntryByPath, fromEntry,
|
import Codec.Archive.Zip (Archive (..), Entry, findEntryByPath, fromEntry,
|
||||||
toArchiveOrFail)
|
toArchiveOrFail)
|
||||||
import Control.DeepSeq (NFData, deepseq)
|
import Control.DeepSeq (NFData, deepseq)
|
||||||
|
|
|
@ -23,7 +23,6 @@ TODO:
|
||||||
-}
|
-}
|
||||||
|
|
||||||
module Text.Pandoc.Readers.FB2 ( readFB2 ) where
|
module Text.Pandoc.Readers.FB2 ( readFB2 ) where
|
||||||
import Prelude
|
|
||||||
import Control.Monad.Except (throwError)
|
import Control.Monad.Except (throwError)
|
||||||
import Control.Monad.State.Strict
|
import Control.Monad.State.Strict
|
||||||
import Data.ByteString.Lazy.Char8 ( pack )
|
import Data.ByteString.Lazy.Char8 ( pack )
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE LambdaCase #-}
|
{-# LANGUAGE LambdaCase #-}
|
||||||
{-# LANGUAGE FlexibleContexts #-}
|
{-# LANGUAGE FlexibleContexts #-}
|
||||||
{-# LANGUAGE FlexibleInstances #-}
|
{-# LANGUAGE FlexibleInstances #-}
|
||||||
|
@ -26,7 +25,6 @@ module Text.Pandoc.Readers.HTML ( readHtml
|
||||||
, isCommentTag
|
, isCommentTag
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Applicative ((<|>))
|
import Control.Applicative ((<|>))
|
||||||
import Control.Arrow (first)
|
import Control.Arrow (first)
|
||||||
import Control.Monad (guard, mplus, msum, mzero, unless, void)
|
import Control.Monad (guard, mplus, msum, mzero, unless, void)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE CPP #-}
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
|
@ -16,7 +15,6 @@ module Text.Pandoc.Readers.Haddock
|
||||||
( readHaddock
|
( readHaddock
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Monad.Except (throwError)
|
import Control.Monad.Except (throwError)
|
||||||
import Data.List (intersperse)
|
import Data.List (intersperse)
|
||||||
import Data.Maybe (fromMaybe)
|
import Data.Maybe (fromMaybe)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE LambdaCase #-}
|
{-# LANGUAGE LambdaCase #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{-# LANGUAGE FlexibleContexts #-}
|
{-# LANGUAGE FlexibleContexts #-}
|
||||||
|
@ -16,7 +15,6 @@ Ipynb (Jupyter notebook JSON format) reader for pandoc.
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.Readers.Ipynb ( readIpynb )
|
module Text.Pandoc.Readers.Ipynb ( readIpynb )
|
||||||
where
|
where
|
||||||
import Prelude
|
|
||||||
import Data.Char (isDigit)
|
import Data.Char (isDigit)
|
||||||
import Data.Maybe (fromMaybe)
|
import Data.Maybe (fromMaybe)
|
||||||
import Data.Digest.Pure.SHA (sha1, showDigest)
|
import Data.Digest.Pure.SHA (sha1, showDigest)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE TupleSections #-}
|
{-# LANGUAGE TupleSections #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
|
@ -14,7 +13,6 @@ Conversion of JATS XML to 'Pandoc' document.
|
||||||
-}
|
-}
|
||||||
|
|
||||||
module Text.Pandoc.Readers.JATS ( readJATS ) where
|
module Text.Pandoc.Readers.JATS ( readJATS ) where
|
||||||
import Prelude
|
|
||||||
import Control.Monad.State.Strict
|
import Control.Monad.State.Strict
|
||||||
import Data.Char (isDigit, isSpace, toUpper)
|
import Data.Char (isDigit, isSpace, toUpper)
|
||||||
import Data.Default
|
import Data.Default
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE LambdaCase #-}
|
{-# LANGUAGE LambdaCase #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
|
@ -12,7 +11,6 @@ Conversion of jira wiki formatted plain text to 'Pandoc' document.
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.Readers.Jira ( readJira ) where
|
module Text.Pandoc.Readers.Jira ( readJira ) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Monad.Except (throwError)
|
import Control.Monad.Except (throwError)
|
||||||
import Data.Text (Text, append, pack, singleton, unpack)
|
import Data.Text (Text, append, pack, singleton, unpack)
|
||||||
import Text.HTML.TagSoup.Entity (lookupEntity)
|
import Text.HTML.TagSoup.Entity (lookupEntity)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{-# LANGUAGE CPP #-}
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE FlexibleInstances #-}
|
{-# LANGUAGE FlexibleInstances #-}
|
||||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
@ -27,7 +26,6 @@ module Text.Pandoc.Readers.LaTeX ( readLaTeX,
|
||||||
untokenize
|
untokenize
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Applicative (many, optional, (<|>))
|
import Control.Applicative (many, optional, (<|>))
|
||||||
import Control.Monad
|
import Control.Monad
|
||||||
import Control.Monad.Except (throwError)
|
import Control.Monad.Except (throwError)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Readers.LaTeX.Lang
|
Module : Text.Pandoc.Readers.LaTeX.Lang
|
||||||
|
@ -17,7 +16,6 @@ module Text.Pandoc.Readers.LaTeX.Lang
|
||||||
, babelLangToBCP47
|
, babelLangToBCP47
|
||||||
)
|
)
|
||||||
where
|
where
|
||||||
import Prelude
|
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
import Text.Pandoc.BCP47 (Lang(..))
|
import Text.Pandoc.BCP47 (Lang(..))
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE FlexibleInstances #-}
|
{-# LANGUAGE FlexibleInstances #-}
|
||||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
@ -69,7 +68,6 @@ module Text.Pandoc.Readers.LaTeX.Parsing
|
||||||
, withRaw
|
, withRaw
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Applicative (many, (<|>))
|
import Control.Applicative (many, (<|>))
|
||||||
import Control.Monad
|
import Control.Monad
|
||||||
import Control.Monad.Except (throwError)
|
import Control.Monad.Except (throwError)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Readers.LaTeX.Types
|
Module : Text.Pandoc.Readers.LaTeX.Types
|
||||||
Copyright : Copyright (C) 2017-2020 John MacFarlane
|
Copyright : Copyright (C) 2017-2020 John MacFarlane
|
||||||
|
@ -18,7 +17,6 @@ module Text.Pandoc.Readers.LaTeX.Types ( Tok(..)
|
||||||
, SourcePos
|
, SourcePos
|
||||||
)
|
)
|
||||||
where
|
where
|
||||||
import Prelude
|
|
||||||
import Data.Text (Text)
|
import Data.Text (Text)
|
||||||
import Text.Parsec.Pos (SourcePos)
|
import Text.Parsec.Pos (SourcePos)
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,6 @@ Conversion of man to 'Pandoc' document.
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.Readers.Man (readMan) where
|
module Text.Pandoc.Readers.Man (readMan) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Data.Char (toLower)
|
import Data.Char (toLower)
|
||||||
import Data.Default (Default)
|
import Data.Default (Default)
|
||||||
import Control.Monad (liftM, mzero, guard, void)
|
import Control.Monad (liftM, mzero, guard, void)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE RelaxedPolyRec #-}
|
{-# LANGUAGE RelaxedPolyRec #-}
|
||||||
{-# LANGUAGE ScopedTypeVariables #-}
|
{-# LANGUAGE ScopedTypeVariables #-}
|
||||||
{-# LANGUAGE TupleSections #-}
|
{-# LANGUAGE TupleSections #-}
|
||||||
|
@ -17,7 +16,6 @@ Conversion of markdown-formatted plain text to 'Pandoc' document.
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.Readers.Markdown ( readMarkdown, yamlToMeta ) where
|
module Text.Pandoc.Readers.Markdown ( readMarkdown, yamlToMeta ) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Monad
|
import Control.Monad
|
||||||
import Control.Monad.Except (throwError)
|
import Control.Monad.Except (throwError)
|
||||||
import Data.Char (isAlphaNum, isPunctuation, isSpace)
|
import Data.Char (isAlphaNum, isPunctuation, isSpace)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{-# LANGUAGE RelaxedPolyRec #-}
|
{-# LANGUAGE RelaxedPolyRec #-}
|
||||||
-- RelaxedPolyRec needed for inlinesBetween on GHC < 7
|
-- RelaxedPolyRec needed for inlinesBetween on GHC < 7
|
||||||
|
@ -20,7 +19,6 @@ _ parse templates?
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.Readers.MediaWiki ( readMediaWiki ) where
|
module Text.Pandoc.Readers.MediaWiki ( readMediaWiki ) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Monad
|
import Control.Monad
|
||||||
import Control.Monad.Except (throwError)
|
import Control.Monad.Except (throwError)
|
||||||
import Data.Char (isDigit, isSpace)
|
import Data.Char (isDigit, isSpace)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE RelaxedPolyRec #-}
|
{-# LANGUAGE RelaxedPolyRec #-}
|
||||||
{-# LANGUAGE ScopedTypeVariables #-}
|
{-# LANGUAGE ScopedTypeVariables #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
@ -15,7 +14,6 @@ Parse YAML/JSON metadata to 'Pandoc' 'Meta'.
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.Readers.Metadata ( yamlBsToMeta ) where
|
module Text.Pandoc.Readers.Metadata ( yamlBsToMeta ) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Monad
|
import Control.Monad
|
||||||
import Control.Monad.Except (throwError)
|
import Control.Monad.Except (throwError)
|
||||||
import qualified Data.ByteString.Lazy as BL
|
import qualified Data.ByteString.Lazy as BL
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE FlexibleContexts #-}
|
{-# LANGUAGE FlexibleContexts #-}
|
||||||
{-# LANGUAGE TupleSections #-}
|
{-# LANGUAGE TupleSections #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
@ -19,7 +18,6 @@ TODO:
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.Readers.Muse (readMuse) where
|
module Text.Pandoc.Readers.Muse (readMuse) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Monad
|
import Control.Monad
|
||||||
import Control.Monad.Reader
|
import Control.Monad.Reader
|
||||||
import Control.Monad.Except (throwError)
|
import Control.Monad.Except (throwError)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Readers.Native
|
Module : Text.Pandoc.Readers.Native
|
||||||
|
@ -14,7 +13,6 @@ Conversion of a string representation of a pandoc type (@Pandoc@,
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.Readers.Native ( readNative ) where
|
module Text.Pandoc.Readers.Native ( readNative ) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Text.Pandoc.Definition
|
import Text.Pandoc.Definition
|
||||||
import Text.Pandoc.Options (ReaderOptions)
|
import Text.Pandoc.Options (ReaderOptions)
|
||||||
import Text.Pandoc.Shared (safeRead)
|
import Text.Pandoc.Shared (safeRead)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Readers.OPML
|
Module : Text.Pandoc.Readers.OPML
|
||||||
|
@ -13,7 +12,6 @@ Conversion of OPML to 'Pandoc' document.
|
||||||
-}
|
-}
|
||||||
|
|
||||||
module Text.Pandoc.Readers.OPML ( readOPML ) where
|
module Text.Pandoc.Readers.OPML ( readOPML ) where
|
||||||
import Prelude
|
|
||||||
import Control.Monad.State.Strict
|
import Control.Monad.State.Strict
|
||||||
import Data.Char (toUpper)
|
import Data.Char (toUpper)
|
||||||
import Data.Default
|
import Data.Default
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE PatternGuards #-}
|
{-# LANGUAGE PatternGuards #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
|
@ -15,7 +14,6 @@ Entry point to the odt reader.
|
||||||
|
|
||||||
module Text.Pandoc.Readers.Odt ( readOdt ) where
|
module Text.Pandoc.Readers.Odt ( readOdt ) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Codec.Archive.Zip
|
import Codec.Archive.Zip
|
||||||
import qualified Text.XML.Light as XML
|
import qualified Text.XML.Light as XML
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE FlexibleInstances #-}
|
{-# LANGUAGE FlexibleInstances #-}
|
||||||
{-# LANGUAGE TupleSections #-}
|
{-# LANGUAGE TupleSections #-}
|
||||||
{- |
|
{- |
|
||||||
|
@ -20,7 +19,6 @@ faster and easier to implement this way.
|
||||||
|
|
||||||
module Text.Pandoc.Readers.Odt.Arrows.State where
|
module Text.Pandoc.Readers.Odt.Arrows.State where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Arrow
|
import Control.Arrow
|
||||||
import qualified Control.Category as Cat
|
import qualified Control.Category as Cat
|
||||||
import Control.Monad
|
import Control.Monad
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Readers.Odt.Arrows.Utils
|
Module : Text.Pandoc.Readers.Odt.Arrows.Utils
|
||||||
Copyright : Copyright (C) 2015 Martin Linnemann
|
Copyright : Copyright (C) 2015 Martin Linnemann
|
||||||
|
@ -22,7 +21,6 @@ with an equivalent return value.
|
||||||
-- We export everything
|
-- We export everything
|
||||||
module Text.Pandoc.Readers.Odt.Arrows.Utils where
|
module Text.Pandoc.Readers.Odt.Arrows.Utils where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Arrow
|
import Control.Arrow
|
||||||
import Control.Monad (join)
|
import Control.Monad (join)
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE Arrows #-}
|
{-# LANGUAGE Arrows #-}
|
||||||
{-# LANGUAGE DeriveFoldable #-}
|
{-# LANGUAGE DeriveFoldable #-}
|
||||||
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
||||||
|
@ -24,7 +23,6 @@ module Text.Pandoc.Readers.Odt.ContentReader
|
||||||
, read_body
|
, read_body
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Applicative hiding (liftA, liftA2, liftA3)
|
import Control.Applicative hiding (liftA, liftA2, liftA3)
|
||||||
import Control.Arrow
|
import Control.Arrow
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Readers.Odt.Generic.Fallible
|
Module : Text.Pandoc.Readers.Odt.Generic.Fallible
|
||||||
Copyright : Copyright (C) 2015 Martin Linnemann
|
Copyright : Copyright (C) 2015 Martin Linnemann
|
||||||
|
@ -19,7 +18,6 @@ compatible instances of "ArrowChoice".
|
||||||
|
|
||||||
-- We export everything
|
-- We export everything
|
||||||
module Text.Pandoc.Readers.Odt.Generic.Fallible where
|
module Text.Pandoc.Readers.Odt.Generic.Fallible where
|
||||||
import Prelude
|
|
||||||
|
|
||||||
-- | Default for now. Will probably become a class at some point.
|
-- | Default for now. Will probably become a class at some point.
|
||||||
type Failure = ()
|
type Failure = ()
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Readers.Odt.Generic.Namespaces
|
Module : Text.Pandoc.Readers.Odt.Generic.Namespaces
|
||||||
Copyright : Copyright (C) 2015 Martin Linnemann
|
Copyright : Copyright (C) 2015 Martin Linnemann
|
||||||
|
@ -14,7 +13,6 @@ typesafe Haskell namespace identifiers and unsafe "real world" namespaces.
|
||||||
|
|
||||||
module Text.Pandoc.Readers.Odt.Generic.Namespaces where
|
module Text.Pandoc.Readers.Odt.Generic.Namespaces where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Readers.Odt.Generic.SetMap
|
Module : Text.Pandoc.Readers.Odt.Generic.SetMap
|
||||||
Copyright : Copyright (C) 2015 Martin Linnemann
|
Copyright : Copyright (C) 2015 Martin Linnemann
|
||||||
|
@ -13,7 +12,6 @@ A map of values to sets of values.
|
||||||
|
|
||||||
module Text.Pandoc.Readers.Odt.Generic.SetMap where
|
module Text.Pandoc.Readers.Odt.Generic.SetMap where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
import qualified Data.Set as S
|
import qualified Data.Set as S
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE TypeOperators #-}
|
{-# LANGUAGE TypeOperators #-}
|
||||||
{-# LANGUAGE ViewPatterns #-}
|
{-# LANGUAGE ViewPatterns #-}
|
||||||
{- |
|
{- |
|
||||||
|
@ -30,7 +29,6 @@ module Text.Pandoc.Readers.Odt.Generic.Utils
|
||||||
, composition
|
, composition
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Category (Category, (<<<), (>>>))
|
import Control.Category (Category, (<<<), (>>>))
|
||||||
import qualified Control.Category as Cat (id)
|
import qualified Control.Category as Cat (id)
|
||||||
import Control.Monad (msum)
|
import Control.Monad (msum)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE TupleSections #-}
|
{-# LANGUAGE TupleSections #-}
|
||||||
{-# LANGUAGE GADTs #-}
|
{-# LANGUAGE GADTs #-}
|
||||||
{-# LANGUAGE PatternGuards #-}
|
{-# LANGUAGE PatternGuards #-}
|
||||||
|
@ -53,7 +52,6 @@ module Text.Pandoc.Readers.Odt.Generic.XMLConverter
|
||||||
, matchContent
|
, matchContent
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Applicative hiding ( liftA, liftA2 )
|
import Control.Applicative hiding ( liftA, liftA2 )
|
||||||
import Control.Monad ( MonadPlus )
|
import Control.Monad ( MonadPlus )
|
||||||
import Control.Arrow
|
import Control.Arrow
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Reader.Odt.Namespaces
|
Module : Text.Pandoc.Reader.Odt.Namespaces
|
||||||
Copyright : Copyright (C) 2015 Martin Linnemann
|
Copyright : Copyright (C) 2015 Martin Linnemann
|
||||||
|
@ -14,7 +13,6 @@ Namespaces used in odt files.
|
||||||
module Text.Pandoc.Readers.Odt.Namespaces ( Namespace (..)
|
module Text.Pandoc.Readers.Odt.Namespaces ( Namespace (..)
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Data.List (isPrefixOf)
|
import Data.List (isPrefixOf)
|
||||||
import qualified Data.Map as M (empty, insert)
|
import qualified Data.Map as M (empty, insert)
|
||||||
import Data.Maybe (fromMaybe, listToMaybe)
|
import Data.Maybe (fromMaybe, listToMaybe)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE CPP #-}
|
{-# LANGUAGE CPP #-}
|
||||||
{-# LANGUAGE Arrows #-}
|
{-# LANGUAGE Arrows #-}
|
||||||
{-# LANGUAGE RecordWildCards #-}
|
{-# LANGUAGE RecordWildCards #-}
|
||||||
|
@ -39,7 +38,6 @@ module Text.Pandoc.Readers.Odt.StyleReader
|
||||||
, readStylesAt
|
, readStylesAt
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Applicative hiding (liftA, liftA2, liftA3)
|
import Control.Applicative hiding (liftA, liftA2, liftA3)
|
||||||
import Control.Arrow
|
import Control.Arrow
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Readers.Org
|
Module : Text.Pandoc.Readers.Org
|
||||||
|
@ -11,7 +10,6 @@ Conversion of org-mode formatted plain text to 'Pandoc' document.
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.Readers.Org ( readOrg ) where
|
module Text.Pandoc.Readers.Org ( readOrg ) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Text.Pandoc.Readers.Org.Blocks (blockList, meta)
|
import Text.Pandoc.Readers.Org.Blocks (blockList, meta)
|
||||||
import Text.Pandoc.Readers.Org.ParserState (optionsToParserState)
|
import Text.Pandoc.Readers.Org.ParserState (optionsToParserState)
|
||||||
import Text.Pandoc.Readers.Org.Parsing (OrgParser, readWithM)
|
import Text.Pandoc.Readers.Org.Parsing (OrgParser, readWithM)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Readers.Org.BlockStarts
|
Module : Text.Pandoc.Readers.Org.BlockStarts
|
||||||
|
@ -24,7 +23,6 @@ module Text.Pandoc.Readers.Org.BlockStarts
|
||||||
, endOfBlock
|
, endOfBlock
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Monad (void)
|
import Control.Monad (void)
|
||||||
import Data.Text (Text)
|
import Data.Text (Text)
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE FlexibleContexts #-}
|
{-# LANGUAGE FlexibleContexts #-}
|
||||||
{-# LANGUAGE RecordWildCards #-}
|
{-# LANGUAGE RecordWildCards #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
@ -16,7 +15,6 @@ module Text.Pandoc.Readers.Org.Blocks
|
||||||
, meta
|
, meta
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Text.Pandoc.Readers.Org.BlockStarts
|
import Text.Pandoc.Readers.Org.BlockStarts
|
||||||
import Text.Pandoc.Readers.Org.DocumentTree (documentTree,
|
import Text.Pandoc.Readers.Org.DocumentTree (documentTree,
|
||||||
unprunedHeadlineToBlocks)
|
unprunedHeadlineToBlocks)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{-# LANGUAGE FlexibleContexts #-}
|
{-# LANGUAGE FlexibleContexts #-}
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{-# LANGUAGE TupleSections #-}
|
{-# LANGUAGE TupleSections #-}
|
||||||
{- |
|
{- |
|
||||||
|
@ -16,7 +15,6 @@ module Text.Pandoc.Readers.Org.DocumentTree
|
||||||
, unprunedHeadlineToBlocks
|
, unprunedHeadlineToBlocks
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Control.Arrow ((***), first)
|
import Control.Arrow ((***), first)
|
||||||
import Control.Monad (guard)
|
import Control.Monad (guard)
|
||||||
import Data.List (intersperse)
|
import Data.List (intersperse)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Readers.Org.ExportSettings
|
Module : Text.Pandoc.Readers.Org.ExportSettings
|
||||||
|
@ -13,7 +12,6 @@ module Text.Pandoc.Readers.Org.ExportSettings
|
||||||
( exportSettings
|
( exportSettings
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Text.Pandoc.Class (PandocMonad, report)
|
import Text.Pandoc.Class (PandocMonad, report)
|
||||||
import Text.Pandoc.Logging (LogMessage (UnknownOrgExportOption))
|
import Text.Pandoc.Logging (LogMessage (UnknownOrgExportOption))
|
||||||
import Text.Pandoc.Readers.Org.ParserState
|
import Text.Pandoc.Readers.Org.ParserState
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{- |
|
{- |
|
||||||
Module : Text.Pandoc.Readers.Org.Inlines
|
Module : Text.Pandoc.Readers.Org.Inlines
|
||||||
|
@ -16,7 +15,6 @@ module Text.Pandoc.Readers.Org.Inlines
|
||||||
, linkTarget
|
, linkTarget
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Text.Pandoc.Readers.Org.BlockStarts (endOfBlock, noteMarker)
|
import Text.Pandoc.Readers.Org.BlockStarts (endOfBlock, noteMarker)
|
||||||
import Text.Pandoc.Readers.Org.ParserState
|
import Text.Pandoc.Readers.Org.ParserState
|
||||||
import Text.Pandoc.Readers.Org.Parsing
|
import Text.Pandoc.Readers.Org.Parsing
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{-# LANGUAGE NoImplicitPrelude #-}
|
|
||||||
{-# LANGUAGE FlexibleContexts #-}
|
{-# LANGUAGE FlexibleContexts #-}
|
||||||
{-# LANGUAGE TupleSections #-}
|
{-# LANGUAGE TupleSections #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
@ -17,7 +16,6 @@ module Text.Pandoc.Readers.Org.Meta
|
||||||
, metaLine
|
, metaLine
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude
|
|
||||||
import Text.Pandoc.Readers.Org.BlockStarts
|
import Text.Pandoc.Readers.Org.BlockStarts
|
||||||
import Text.Pandoc.Readers.Org.ExportSettings (exportSettings)
|
import Text.Pandoc.Readers.Org.ExportSettings (exportSettings)
|
||||||
import Text.Pandoc.Readers.Org.Inlines
|
import Text.Pandoc.Readers.Org.Inlines
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue