mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-26 18:26:36 +00:00
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.
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE PackageImports #-}
|
||||
{-# LANGUAGE CPP #-}
|
||||
|
||||
-- The intent is that this Prelude provide the API of
|
||||
-- the base 4.11 Prelude in a way that is portable for
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
@@ -23,7 +22,6 @@ module Text.Pandoc.App (
|
||||
, options
|
||||
, applyFilters
|
||||
) where
|
||||
import Prelude
|
||||
import qualified Control.Exception as E
|
||||
import Control.Monad
|
||||
import Control.Monad.Trans
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
{-# LANGUAGE TupleSections #-}
|
||||
@@ -22,7 +21,6 @@ module Text.Pandoc.App.CommandLineOptions (
|
||||
, lookupHighlightStyle
|
||||
, setVariable
|
||||
) where
|
||||
import Prelude
|
||||
import Control.Monad
|
||||
import Control.Monad.Trans
|
||||
import Control.Monad.Except (throwError)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.App.FormatHeuristics
|
||||
@@ -15,7 +14,6 @@ module Text.Pandoc.App.FormatHeuristics
|
||||
( formatFromFilePaths
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Data.Char (toLower)
|
||||
import Data.Text (Text)
|
||||
import System.FilePath (takeExtension)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
@@ -23,7 +22,6 @@ module Text.Pandoc.App.Opt (
|
||||
, defaultOpts
|
||||
, addMeta
|
||||
) where
|
||||
import Prelude
|
||||
import Data.Char (isLower, toLower)
|
||||
import GHC.Generics hiding (Meta)
|
||||
import Text.Pandoc.Builder (setMeta)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
{-# LANGUAGE TupleSections #-}
|
||||
@@ -19,7 +18,6 @@ module Text.Pandoc.App.OutputSettings
|
||||
( OutputSettings (..)
|
||||
, optToOutputSettings
|
||||
) where
|
||||
import Prelude
|
||||
import qualified Data.Map as M
|
||||
import qualified Data.Text as T
|
||||
import Text.DocTemplates (toVal, Context(..), Val(..))
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Asciify
|
||||
Copyright : Copyright (C) 2013-2020 John MacFarlane
|
||||
@@ -13,7 +12,6 @@ ascii equivalents (used in constructing HTML identifiers).
|
||||
-}
|
||||
module Text.Pandoc.Asciify (toAsciiChar)
|
||||
where
|
||||
import Prelude
|
||||
import Data.Char (isAscii)
|
||||
import qualified Data.Map as M
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.BCP47
|
||||
Copyright : Copyright (C) 2017–2020 John MacFarlane
|
||||
@@ -18,7 +17,6 @@ module Text.Pandoc.BCP47 (
|
||||
, renderLang
|
||||
)
|
||||
where
|
||||
import Prelude
|
||||
import Control.Monad (guard)
|
||||
import Data.Char (isAlphaNum, isAscii, isLetter, isLower, isUpper)
|
||||
import Text.Pandoc.Definition
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.CSS
|
||||
Copyright : © 2006-2020 John MacFarlane <jgm@berkeley.edu>,
|
||||
@@ -18,7 +17,6 @@ module Text.Pandoc.CSS ( foldOrElse
|
||||
)
|
||||
where
|
||||
|
||||
import Prelude
|
||||
import qualified Data.Text as T
|
||||
import Text.Pandoc.Shared (trim)
|
||||
import Text.Parsec
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.CSV
|
||||
Copyright : Copyright (C) 2017–2020 John MacFarlane <jgm@berkeley.edu>
|
||||
@@ -17,7 +16,6 @@ module Text.Pandoc.CSV (
|
||||
ParseError
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Control.Monad (unless, void)
|
||||
import Data.Text (Text)
|
||||
import qualified Data.Text as T
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE PatternGuards #-}
|
||||
{-# LANGUAGE DeriveFunctor #-}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
@@ -52,7 +52,6 @@ module Text.Pandoc.Class.PandocMonad
|
||||
, makeCanonical
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Codec.Archive.Zip
|
||||
import Control.Monad.Except (MonadError (catchError, throwError),
|
||||
MonadTrans, lift, when)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Data
|
||||
@@ -13,7 +12,6 @@ Provide contents data files as Haskell values.
|
||||
-}
|
||||
module Text.Pandoc.Data (dataFiles) where
|
||||
|
||||
import Prelude
|
||||
import qualified Data.ByteString as B
|
||||
import Data.FileEmbed
|
||||
import System.FilePath (splitDirectories)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Emoji
|
||||
@@ -12,7 +11,6 @@
|
||||
Emoji symbol lookup from canonical string identifier.
|
||||
-}
|
||||
module Text.Pandoc.Emoji ( emojis, emojiToInline ) where
|
||||
import Prelude
|
||||
import qualified Text.Emoji as E
|
||||
import Text.Pandoc.Definition (Inline (Span, Str))
|
||||
import Data.Text (Text)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE DeriveDataTypeable #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
@@ -19,7 +18,6 @@ module Text.Pandoc.Error (
|
||||
PandocError(..),
|
||||
handleError) where
|
||||
|
||||
import Prelude
|
||||
import Control.Exception (Exception)
|
||||
import Data.Typeable (Typeable)
|
||||
import Data.Word (Word8)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE DeriveDataTypeable #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
||||
@@ -33,7 +32,6 @@ module Text.Pandoc.Extensions ( Extension(..)
|
||||
, githubMarkdownExtensions
|
||||
, multimarkdownExtensions )
|
||||
where
|
||||
import Prelude
|
||||
import Data.Bits (clearBit, setBit, testBit, (.|.))
|
||||
import Data.Data (Data)
|
||||
import qualified Data.Text as T
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
@@ -19,7 +18,6 @@ module Text.Pandoc.Filter
|
||||
, applyFilters
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import System.CPUTime (getCPUTime)
|
||||
import Data.Aeson.TH (deriveJSON, defaultOptions)
|
||||
import GHC.Generics (Generic)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Filter
|
||||
@@ -13,7 +12,6 @@ Programmatically modifications of pandoc documents via JSON filters.
|
||||
-}
|
||||
module Text.Pandoc.Filter.JSON (apply) where
|
||||
|
||||
import Prelude
|
||||
import Control.Monad (unless, when)
|
||||
import Control.Monad.Trans (MonadIO (liftIO))
|
||||
import Data.Aeson (eitherDecode', encode)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Filter.Lua
|
||||
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
|
||||
|
||||
import Prelude
|
||||
import Control.Exception (throw)
|
||||
import Control.Monad ((>=>))
|
||||
import qualified Data.Text as T
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Filter.Path
|
||||
Copyright : Copyright (C) 2006-2020 John MacFarlane
|
||||
@@ -14,7 +13,6 @@ module Text.Pandoc.Filter.Path
|
||||
( expandFilterPath
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Text.Pandoc.Class (PandocMonad, fileExists, getUserDataDir)
|
||||
import System.FilePath ((</>), isRelative)
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Highlighting
|
||||
@@ -34,7 +33,6 @@ module Text.Pandoc.Highlighting ( highlightingStyles
|
||||
, fromListingsLanguage
|
||||
, toListingsLanguage
|
||||
) where
|
||||
import Prelude
|
||||
import Control.Monad
|
||||
import qualified Data.Map as M
|
||||
import Data.Maybe (fromMaybe)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, CPP #-}
|
||||
{-# LANGUAGE ViewPatterns #-}
|
||||
{- |
|
||||
@@ -13,7 +12,6 @@ Portability : portable
|
||||
Functions for converting images.
|
||||
-}
|
||||
module Text.Pandoc.Image ( svgToPng ) where
|
||||
import Prelude
|
||||
import Text.Pandoc.Options (WriterOptions(..))
|
||||
import Text.Pandoc.Process (pipeProcess)
|
||||
import qualified Data.ByteString.Lazy as L
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, CPP #-}
|
||||
{-# LANGUAGE ViewPatterns #-}
|
||||
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
|
||||
@@ -33,7 +32,6 @@ module Text.Pandoc.ImageSize ( ImageType(..)
|
||||
, showInPixel
|
||||
, showFl
|
||||
) where
|
||||
import Prelude
|
||||
import Data.ByteString (ByteString, unpack)
|
||||
import qualified Data.ByteString.Char8 as B
|
||||
import qualified Data.ByteString.Lazy as BL
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE DeriveDataTypeable #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
@@ -23,7 +22,6 @@ module Text.Pandoc.Logging (
|
||||
, messageVerbosity
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Control.Monad (mzero)
|
||||
import Data.YAML (withStr, FromYAML(..))
|
||||
import Data.Aeson
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Lua
|
||||
Copyright : Copyright © 2017–2020 Albert Krewinkel
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Lua.Filter
|
||||
Copyright : © 2012–2020 John MacFarlane,
|
||||
@@ -17,7 +16,6 @@ module Text.Pandoc.Lua.Filter ( LuaFilterFunction
|
||||
, walkBlocks
|
||||
, module Text.Pandoc.Lua.Walk
|
||||
) where
|
||||
import Prelude
|
||||
import Control.Applicative ((<|>))
|
||||
import Control.Monad (mplus, (>=>))
|
||||
import Control.Monad.Catch (finally)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{-# LANGUAGE DeriveDataTypeable #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Lua
|
||||
Copyright : Copyright © 2017-2020 Albert Krewinkel
|
||||
@@ -15,7 +14,6 @@ module Text.Pandoc.Lua.Global
|
||||
, setGlobals
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Data.Data (Data)
|
||||
import Foreign.Lua (Lua, Peekable, Pushable)
|
||||
import Foreign.Lua.Userdata ( ensureUserdataMetatable, pushAnyWithMetatable
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Lua
|
||||
Copyright : Copyright © 2017-2020 Albert Krewinkel
|
||||
@@ -16,7 +15,6 @@ module Text.Pandoc.Lua.Init
|
||||
, luaPackageParams
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Control.Monad.Trans (MonadIO (..))
|
||||
import Data.Data (Data, dataTypeConstrs, dataTypeOf, showConstr)
|
||||
import Foreign.Lua (Lua)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE LambdaCase #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Lua.Marshaling.AST
|
||||
@@ -17,7 +16,6 @@ module Text.Pandoc.Lua.Marshaling.AST
|
||||
, LuaListAttributes (..)
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Control.Applicative ((<|>))
|
||||
import Foreign.Lua (Lua, Peekable, Pushable, StackIndex)
|
||||
import Text.Pandoc.Definition
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Lua.Marshaling.AnyValue
|
||||
Copyright : © 2017-2020 Albert Krewinkel
|
||||
@@ -15,7 +14,6 @@ into HsLua.
|
||||
-}
|
||||
module Text.Pandoc.Lua.Marshaling.AnyValue (AnyValue (..)) where
|
||||
|
||||
import Prelude
|
||||
import Foreign.Lua (Peekable (peek), StackIndex)
|
||||
|
||||
-- | Dummy type to allow values of arbitrary Lua type. This just wraps
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||
{-# LANGUAGE LambdaCase #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
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
|
||||
|
||||
import Prelude
|
||||
import Foreign.Lua (Lua, Peekable, Pushable)
|
||||
import Foreign.Lua.Types.Peekable (reportValueOnFailure)
|
||||
import Foreign.Lua.Userdata (ensureUserdataMetatable, pushAnyWithMetatable,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||
{- |
|
||||
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
|
||||
|
||||
import Prelude
|
||||
import qualified Foreign.Lua as Lua
|
||||
import Foreign.Lua (Pushable)
|
||||
import Text.DocTemplates (Context(..), Val(..), TemplateTarget)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{-# LANGUAGE DeriveDataTypeable #-}
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE UndecidableInstances #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Lua.Marshaling.List
|
||||
@@ -17,7 +16,6 @@ module Text.Pandoc.Lua.Marshaling.List
|
||||
( List (..)
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Data.Data (Data)
|
||||
import Foreign.Lua (Peekable, Pushable)
|
||||
import Text.Pandoc.Walk (Walkable (..))
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Lua.Marshaling.MediaBag
|
||||
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
|
||||
|
||||
import Prelude
|
||||
import Foreign.Ptr (Ptr)
|
||||
import Foreign.StablePtr (StablePtr, deRefStablePtr, newStablePtr)
|
||||
import Foreign.Lua (Lua, NumResults, Peekable, Pushable, StackIndex)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{-# LANGUAGE LambdaCase #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||
@@ -16,7 +15,6 @@ Marshaling instance for ReaderOptions and its components.
|
||||
-}
|
||||
module Text.Pandoc.Lua.Marshaling.ReaderOptions () where
|
||||
|
||||
import Prelude
|
||||
import Data.Data (showConstr, toConstr)
|
||||
import Foreign.Lua (Lua, Pushable)
|
||||
import Text.Pandoc.Extensions (Extensions)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||
{-# LANGUAGE LambdaCase #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
{- |
|
||||
@@ -20,7 +19,6 @@ module Text.Pandoc.Lua.Marshaling.Version
|
||||
)
|
||||
where
|
||||
|
||||
import Prelude
|
||||
import Data.Text (Text)
|
||||
import Data.Maybe (fromMaybe)
|
||||
import Data.Version (Version (..), makeVersion, parseVersion, showVersion)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Lua.Module.MediaBag
|
||||
@@ -14,7 +13,6 @@ module Text.Pandoc.Lua.Module.MediaBag
|
||||
( pushModule
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Control.Monad (zipWithM_)
|
||||
import Foreign.Lua (Lua, NumResults, Optional, liftIO)
|
||||
import Text.Pandoc.Class (CommonState (..), fetchItem, putCommonState,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Lua.Module.Pandoc
|
||||
@@ -15,7 +14,6 @@ module Text.Pandoc.Lua.Module.Pandoc
|
||||
( pushModule
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Control.Monad (when)
|
||||
import Control.Monad.Except (throwError)
|
||||
import Data.Default (Default (..))
|
||||
|
||||
@@ -12,7 +12,6 @@ module Text.Pandoc.Lua.Module.System
|
||||
( pushModule
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Foreign.Lua (Lua, NumResults)
|
||||
import Foreign.Lua.Module.System (arch, env, getwd, os,
|
||||
with_env, with_tmpdir, with_wd)
|
||||
|
||||
@@ -12,7 +12,6 @@ module Text.Pandoc.Lua.Module.Types
|
||||
( pushModule
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Data.Version (Version)
|
||||
import Foreign.Lua (Lua, NumResults)
|
||||
import Text.Pandoc.Definition
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Lua.Module.Utils
|
||||
Copyright : Copyright © 2017-2020 Albert Krewinkel
|
||||
@@ -13,7 +12,6 @@ module Text.Pandoc.Lua.Module.Utils
|
||||
( pushModule
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Control.Applicative ((<|>))
|
||||
import Data.Default (def)
|
||||
import Data.Version (Version)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Lua.Packages
|
||||
@@ -16,7 +15,6 @@ module Text.Pandoc.Lua.Packages
|
||||
, installPandocPackageSearcher
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Control.Monad (forM_)
|
||||
import Data.ByteString (ByteString)
|
||||
import Foreign.Lua (Lua, NumResults, liftIO)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE LambdaCase #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Lua.Util
|
||||
@@ -27,7 +26,6 @@ module Text.Pandoc.Lua.Util
|
||||
, dofileWithTraceback
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Control.Monad (unless, when)
|
||||
import Foreign.Lua ( Lua, NumArgs, NumResults, Peekable, Pushable, StackIndex
|
||||
, Status, ToHaskellFunction )
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{-# LANGUAGE DeriveTraversable #-}
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Lua.Walk
|
||||
@@ -18,7 +17,6 @@ module Text.Pandoc.Lua.Walk
|
||||
)
|
||||
where
|
||||
|
||||
import Prelude
|
||||
import Control.Monad ((<=<))
|
||||
import Text.Pandoc.Definition
|
||||
import Text.Pandoc.Walk
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.MIME
|
||||
@@ -13,7 +12,6 @@ Mime type lookup.
|
||||
-}
|
||||
module Text.Pandoc.MIME ( MimeType, getMimeType, getMimeTypeDef,
|
||||
extensionFromMimeType, mediaCategory ) where
|
||||
import Prelude
|
||||
import Data.List (isPrefixOf, isSuffixOf)
|
||||
import qualified Data.Map as M
|
||||
import qualified Data.Text as T
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE DeriveDataTypeable #-}
|
||||
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
||||
@@ -22,7 +21,6 @@ module Text.Pandoc.MediaBag (
|
||||
mediaDirectory,
|
||||
mediaItems
|
||||
) where
|
||||
import Prelude
|
||||
import qualified Data.ByteString.Lazy as BL
|
||||
import Data.Data (Data)
|
||||
import qualified Data.Map as M
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE DeriveDataTypeable #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
@@ -33,7 +32,6 @@ module Text.Pandoc.Options ( module Text.Pandoc.Extensions
|
||||
, defaultMathJaxURL
|
||||
, defaultKaTeXURL
|
||||
) where
|
||||
import Prelude
|
||||
import Control.Applicative ((<|>))
|
||||
import Data.Char (toLower)
|
||||
import Data.Maybe (fromMaybe)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
@@ -15,7 +14,6 @@ Conversion of LaTeX documents to PDF.
|
||||
-}
|
||||
module Text.Pandoc.PDF ( makePDF ) where
|
||||
|
||||
import Prelude
|
||||
import qualified Codec.Picture as JP
|
||||
import qualified Control.Exception as E
|
||||
import Control.Monad (when)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE ExplicitForAll #-}
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
@@ -186,7 +185,6 @@ module Text.Pandoc.Parsing ( take1WhileP,
|
||||
)
|
||||
where
|
||||
|
||||
import Prelude
|
||||
import Control.Monad.Identity
|
||||
import Control.Monad.Reader
|
||||
import Data.Char (chr, isAlphaNum, isAscii, isAsciiUpper,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Process
|
||||
Copyright : Copyright (C) 2013-2020 John MacFarlane
|
||||
@@ -12,7 +11,6 @@ ByteString variant of 'readProcessWithExitCode'.
|
||||
-}
|
||||
module Text.Pandoc.Process (pipeProcess)
|
||||
where
|
||||
import Prelude
|
||||
import Control.Concurrent (MVar, forkIO, killThread, newEmptyMVar, putMVar,
|
||||
takeMVar)
|
||||
import Control.Exception (SomeException (..))
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{-# LANGUAGE MonoLocalBinds #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
@@ -57,7 +56,6 @@ module Text.Pandoc.Readers
|
||||
, getDefaultExtensions
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Control.Monad (unless)
|
||||
import Control.Monad.Except (throwError)
|
||||
import Data.Aeson
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
@@ -14,7 +13,6 @@
|
||||
Conversion from CSV to a 'Pandoc' table.
|
||||
-}
|
||||
module Text.Pandoc.Readers.CSV ( readCSV ) where
|
||||
import Prelude
|
||||
import Data.Text (Text)
|
||||
import qualified Data.Text as T
|
||||
import Text.Pandoc.CSV (parseCSV, defaultCSVOptions)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE ViewPatterns #-}
|
||||
{- |
|
||||
@@ -17,7 +16,6 @@ CommonMark is a strongly specified variant of Markdown: http://commonmark.org.
|
||||
module Text.Pandoc.Readers.CommonMark (readCommonMark)
|
||||
where
|
||||
|
||||
import Prelude
|
||||
import CMarkGFM
|
||||
import Control.Monad.State
|
||||
import qualified Data.Set as Set
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Readers.Creole
|
||||
@@ -14,7 +13,6 @@ Conversion of creole text to 'Pandoc' document.
|
||||
module Text.Pandoc.Readers.Creole ( readCreole
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Control.Monad.Except (guard, liftM2, throwError)
|
||||
import qualified Data.Foldable as F
|
||||
import Data.Maybe (fromMaybe)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Readers.DocBook
|
||||
@@ -12,7 +11,6 @@
|
||||
Conversion of DocBook XML to 'Pandoc' document.
|
||||
-}
|
||||
module Text.Pandoc.Readers.DocBook ( readDocBook ) where
|
||||
import Prelude
|
||||
import Control.Monad.State.Strict
|
||||
import Data.Char (isSpace, toUpper)
|
||||
import Data.Default
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE PatternGuards #-}
|
||||
@@ -60,7 +59,6 @@ module Text.Pandoc.Readers.Docx
|
||||
( readDocx
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Codec.Archive.Zip
|
||||
import Control.Monad.Reader
|
||||
import Control.Monad.State.Strict
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE PatternGuards #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
@@ -59,7 +58,6 @@ module Text.Pandoc.Readers.Docx.Combine ( smushInlines
|
||||
)
|
||||
where
|
||||
|
||||
import Prelude
|
||||
import Data.List
|
||||
import Data.Sequence (ViewL (..), ViewR (..), viewl, viewr, (><), (|>))
|
||||
import qualified Data.Sequence as Seq (null)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Readers.Docx.Fields
|
||||
@@ -16,7 +15,6 @@ module Text.Pandoc.Readers.Docx.Fields ( FieldInfo(..)
|
||||
, parseFieldInfo
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Data.Functor (($>), void)
|
||||
import qualified Data.Text as T
|
||||
import Text.Parsec
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Readers.Docx.Lists
|
||||
@@ -18,7 +17,6 @@ module Text.Pandoc.Readers.Docx.Lists ( blocksToBullets
|
||||
, listParagraphStyles
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Data.List
|
||||
import Data.Maybe
|
||||
import Data.String (fromString)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE ViewPatterns #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
@@ -52,7 +51,6 @@ module Text.Pandoc.Readers.Docx.Parse ( Docx(..)
|
||||
, constructBogusParStyleData
|
||||
, leftBiasedMergeRunStyle
|
||||
) where
|
||||
import Prelude
|
||||
import Text.Pandoc.Readers.Docx.Parse.Styles
|
||||
import Codec.Archive.Zip
|
||||
import Control.Applicative ((<|>))
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
@@ -43,7 +42,6 @@ module Text.Pandoc.Readers.Docx.Parse.Styles (
|
||||
, defaultRunStyle
|
||||
, checkOnOff
|
||||
) where
|
||||
import Prelude
|
||||
import Codec.Archive.Zip
|
||||
import Control.Applicative ((<|>))
|
||||
import Control.Monad.Except
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Readers.Docx.StyleMaps
|
||||
Copyright : © 2014-2020 Jesse Rosenthal <jrosenthal@jhu.edu>,
|
||||
@@ -24,7 +23,6 @@ module Text.Pandoc.Readers.Docx.Util (
|
||||
, findAttrTextByName
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Data.Maybe (mapMaybe)
|
||||
import qualified Data.Text as T
|
||||
import Text.XML.Light
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE TupleSections #-}
|
||||
{-# LANGUAGE ViewPatterns #-}
|
||||
@@ -16,7 +15,6 @@ Conversion of DokuWiki text to 'Pandoc' document.
|
||||
-}
|
||||
module Text.Pandoc.Readers.DokuWiki (readDokuWiki) where
|
||||
|
||||
import Prelude
|
||||
import Control.Monad
|
||||
import Control.Monad.Except (throwError)
|
||||
import Data.Char (isAlphaNum, isDigit)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE TupleSections #-}
|
||||
{-# LANGUAGE ViewPatterns #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
@@ -18,7 +17,6 @@ module Text.Pandoc.Readers.EPUB
|
||||
(readEPUB)
|
||||
where
|
||||
|
||||
import Prelude
|
||||
import Codec.Archive.Zip (Archive (..), Entry, findEntryByPath, fromEntry,
|
||||
toArchiveOrFail)
|
||||
import Control.DeepSeq (NFData, deepseq)
|
||||
|
||||
@@ -23,7 +23,6 @@ TODO:
|
||||
-}
|
||||
|
||||
module Text.Pandoc.Readers.FB2 ( readFB2 ) where
|
||||
import Prelude
|
||||
import Control.Monad.Except (throwError)
|
||||
import Control.Monad.State.Strict
|
||||
import Data.ByteString.Lazy.Char8 ( pack )
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE LambdaCase #-}
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
@@ -26,7 +25,6 @@ module Text.Pandoc.Readers.HTML ( readHtml
|
||||
, isCommentTag
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Control.Applicative ((<|>))
|
||||
import Control.Arrow (first)
|
||||
import Control.Monad (guard, mplus, msum, mzero, unless, void)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
@@ -16,7 +15,6 @@ module Text.Pandoc.Readers.Haddock
|
||||
( readHaddock
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Control.Monad.Except (throwError)
|
||||
import Data.List (intersperse)
|
||||
import Data.Maybe (fromMaybe)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE LambdaCase #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
@@ -16,7 +15,6 @@ Ipynb (Jupyter notebook JSON format) reader for pandoc.
|
||||
-}
|
||||
module Text.Pandoc.Readers.Ipynb ( readIpynb )
|
||||
where
|
||||
import Prelude
|
||||
import Data.Char (isDigit)
|
||||
import Data.Maybe (fromMaybe)
|
||||
import Data.Digest.Pure.SHA (sha1, showDigest)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE TupleSections #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
@@ -14,7 +13,6 @@ Conversion of JATS XML to 'Pandoc' document.
|
||||
-}
|
||||
|
||||
module Text.Pandoc.Readers.JATS ( readJATS ) where
|
||||
import Prelude
|
||||
import Control.Monad.State.Strict
|
||||
import Data.Char (isDigit, isSpace, toUpper)
|
||||
import Data.Default
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE LambdaCase #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
@@ -12,7 +11,6 @@ Conversion of jira wiki formatted plain text to 'Pandoc' document.
|
||||
-}
|
||||
module Text.Pandoc.Readers.Jira ( readJira ) where
|
||||
|
||||
import Prelude
|
||||
import Control.Monad.Except (throwError)
|
||||
import Data.Text (Text, append, pack, singleton, unpack)
|
||||
import Text.HTML.TagSoup.Entity (lookupEntity)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
@@ -27,7 +26,6 @@ module Text.Pandoc.Readers.LaTeX ( readLaTeX,
|
||||
untokenize
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Control.Applicative (many, optional, (<|>))
|
||||
import Control.Monad
|
||||
import Control.Monad.Except (throwError)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Readers.LaTeX.Lang
|
||||
@@ -17,7 +16,6 @@ module Text.Pandoc.Readers.LaTeX.Lang
|
||||
, babelLangToBCP47
|
||||
)
|
||||
where
|
||||
import Prelude
|
||||
import qualified Data.Map as M
|
||||
import qualified Data.Text as T
|
||||
import Text.Pandoc.BCP47 (Lang(..))
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
@@ -69,7 +68,6 @@ module Text.Pandoc.Readers.LaTeX.Parsing
|
||||
, withRaw
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Control.Applicative (many, (<|>))
|
||||
import Control.Monad
|
||||
import Control.Monad.Except (throwError)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Readers.LaTeX.Types
|
||||
Copyright : Copyright (C) 2017-2020 John MacFarlane
|
||||
@@ -18,7 +17,6 @@ module Text.Pandoc.Readers.LaTeX.Types ( Tok(..)
|
||||
, SourcePos
|
||||
)
|
||||
where
|
||||
import Prelude
|
||||
import Data.Text (Text)
|
||||
import Text.Parsec.Pos (SourcePos)
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ Conversion of man to 'Pandoc' document.
|
||||
-}
|
||||
module Text.Pandoc.Readers.Man (readMan) where
|
||||
|
||||
import Prelude
|
||||
import Data.Char (toLower)
|
||||
import Data.Default (Default)
|
||||
import Control.Monad (liftM, mzero, guard, void)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE RelaxedPolyRec #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
{-# LANGUAGE TupleSections #-}
|
||||
@@ -17,7 +16,6 @@ Conversion of markdown-formatted plain text to 'Pandoc' document.
|
||||
-}
|
||||
module Text.Pandoc.Readers.Markdown ( readMarkdown, yamlToMeta ) where
|
||||
|
||||
import Prelude
|
||||
import Control.Monad
|
||||
import Control.Monad.Except (throwError)
|
||||
import Data.Char (isAlphaNum, isPunctuation, isSpace)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE RelaxedPolyRec #-}
|
||||
-- RelaxedPolyRec needed for inlinesBetween on GHC < 7
|
||||
@@ -20,7 +19,6 @@ _ parse templates?
|
||||
-}
|
||||
module Text.Pandoc.Readers.MediaWiki ( readMediaWiki ) where
|
||||
|
||||
import Prelude
|
||||
import Control.Monad
|
||||
import Control.Monad.Except (throwError)
|
||||
import Data.Char (isDigit, isSpace)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE RelaxedPolyRec #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
@@ -15,7 +14,6 @@ Parse YAML/JSON metadata to 'Pandoc' 'Meta'.
|
||||
-}
|
||||
module Text.Pandoc.Readers.Metadata ( yamlBsToMeta ) where
|
||||
|
||||
import Prelude
|
||||
import Control.Monad
|
||||
import Control.Monad.Except (throwError)
|
||||
import qualified Data.ByteString.Lazy as BL
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE TupleSections #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
@@ -19,7 +18,6 @@ TODO:
|
||||
-}
|
||||
module Text.Pandoc.Readers.Muse (readMuse) where
|
||||
|
||||
import Prelude
|
||||
import Control.Monad
|
||||
import Control.Monad.Reader
|
||||
import Control.Monad.Except (throwError)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
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
|
||||
|
||||
import Prelude
|
||||
import Text.Pandoc.Definition
|
||||
import Text.Pandoc.Options (ReaderOptions)
|
||||
import Text.Pandoc.Shared (safeRead)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Readers.OPML
|
||||
@@ -13,7 +12,6 @@ Conversion of OPML to 'Pandoc' document.
|
||||
-}
|
||||
|
||||
module Text.Pandoc.Readers.OPML ( readOPML ) where
|
||||
import Prelude
|
||||
import Control.Monad.State.Strict
|
||||
import Data.Char (toUpper)
|
||||
import Data.Default
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE PatternGuards #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
@@ -15,7 +14,6 @@ Entry point to the odt reader.
|
||||
|
||||
module Text.Pandoc.Readers.Odt ( readOdt ) where
|
||||
|
||||
import Prelude
|
||||
import Codec.Archive.Zip
|
||||
import qualified Text.XML.Light as XML
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE TupleSections #-}
|
||||
{- |
|
||||
@@ -20,7 +19,6 @@ faster and easier to implement this way.
|
||||
|
||||
module Text.Pandoc.Readers.Odt.Arrows.State where
|
||||
|
||||
import Prelude
|
||||
import Control.Arrow
|
||||
import qualified Control.Category as Cat
|
||||
import Control.Monad
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Readers.Odt.Arrows.Utils
|
||||
Copyright : Copyright (C) 2015 Martin Linnemann
|
||||
@@ -22,7 +21,6 @@ with an equivalent return value.
|
||||
-- We export everything
|
||||
module Text.Pandoc.Readers.Odt.Arrows.Utils where
|
||||
|
||||
import Prelude
|
||||
import Control.Arrow
|
||||
import Control.Monad (join)
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE Arrows #-}
|
||||
{-# LANGUAGE DeriveFoldable #-}
|
||||
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
||||
@@ -24,7 +23,6 @@ module Text.Pandoc.Readers.Odt.ContentReader
|
||||
, read_body
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Control.Applicative hiding (liftA, liftA2, liftA3)
|
||||
import Control.Arrow
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Readers.Odt.Generic.Fallible
|
||||
Copyright : Copyright (C) 2015 Martin Linnemann
|
||||
@@ -19,7 +18,6 @@ compatible instances of "ArrowChoice".
|
||||
|
||||
-- We export everything
|
||||
module Text.Pandoc.Readers.Odt.Generic.Fallible where
|
||||
import Prelude
|
||||
|
||||
-- | Default for now. Will probably become a class at some point.
|
||||
type Failure = ()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Readers.Odt.Generic.Namespaces
|
||||
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
|
||||
|
||||
import Prelude
|
||||
import qualified Data.Map as M
|
||||
|
||||
--
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Readers.Odt.Generic.SetMap
|
||||
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
|
||||
|
||||
import Prelude
|
||||
import qualified Data.Map as M
|
||||
import qualified Data.Set as S
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
{-# LANGUAGE ViewPatterns #-}
|
||||
{- |
|
||||
@@ -30,7 +29,6 @@ module Text.Pandoc.Readers.Odt.Generic.Utils
|
||||
, composition
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Control.Category (Category, (<<<), (>>>))
|
||||
import qualified Control.Category as Cat (id)
|
||||
import Control.Monad (msum)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE TupleSections #-}
|
||||
{-# LANGUAGE GADTs #-}
|
||||
{-# LANGUAGE PatternGuards #-}
|
||||
@@ -53,7 +52,6 @@ module Text.Pandoc.Readers.Odt.Generic.XMLConverter
|
||||
, matchContent
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Control.Applicative hiding ( liftA, liftA2 )
|
||||
import Control.Monad ( MonadPlus )
|
||||
import Control.Arrow
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Reader.Odt.Namespaces
|
||||
Copyright : Copyright (C) 2015 Martin Linnemann
|
||||
@@ -14,7 +13,6 @@ Namespaces used in odt files.
|
||||
module Text.Pandoc.Readers.Odt.Namespaces ( Namespace (..)
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Data.List (isPrefixOf)
|
||||
import qualified Data.Map as M (empty, insert)
|
||||
import Data.Maybe (fromMaybe, listToMaybe)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE Arrows #-}
|
||||
{-# LANGUAGE RecordWildCards #-}
|
||||
@@ -39,7 +38,6 @@ module Text.Pandoc.Readers.Odt.StyleReader
|
||||
, readStylesAt
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Control.Applicative hiding (liftA, liftA2, liftA3)
|
||||
import Control.Arrow
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
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
|
||||
|
||||
import Prelude
|
||||
import Text.Pandoc.Readers.Org.Blocks (blockList, meta)
|
||||
import Text.Pandoc.Readers.Org.ParserState (optionsToParserState)
|
||||
import Text.Pandoc.Readers.Org.Parsing (OrgParser, readWithM)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Readers.Org.BlockStarts
|
||||
@@ -24,7 +23,6 @@ module Text.Pandoc.Readers.Org.BlockStarts
|
||||
, endOfBlock
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Control.Monad (void)
|
||||
import Data.Text (Text)
|
||||
import qualified Data.Text as T
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE RecordWildCards #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
@@ -16,7 +15,6 @@ module Text.Pandoc.Readers.Org.Blocks
|
||||
, meta
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Text.Pandoc.Readers.Org.BlockStarts
|
||||
import Text.Pandoc.Readers.Org.DocumentTree (documentTree,
|
||||
unprunedHeadlineToBlocks)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE TupleSections #-}
|
||||
{- |
|
||||
@@ -16,7 +15,6 @@ module Text.Pandoc.Readers.Org.DocumentTree
|
||||
, unprunedHeadlineToBlocks
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Control.Arrow ((***), first)
|
||||
import Control.Monad (guard)
|
||||
import Data.List (intersperse)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Readers.Org.ExportSettings
|
||||
@@ -13,7 +12,6 @@ module Text.Pandoc.Readers.Org.ExportSettings
|
||||
( exportSettings
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Text.Pandoc.Class (PandocMonad, report)
|
||||
import Text.Pandoc.Logging (LogMessage (UnknownOrgExportOption))
|
||||
import Text.Pandoc.Readers.Org.ParserState
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{- |
|
||||
Module : Text.Pandoc.Readers.Org.Inlines
|
||||
@@ -16,7 +15,6 @@ module Text.Pandoc.Readers.Org.Inlines
|
||||
, linkTarget
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Text.Pandoc.Readers.Org.BlockStarts (endOfBlock, noteMarker)
|
||||
import Text.Pandoc.Readers.Org.ParserState
|
||||
import Text.Pandoc.Readers.Org.Parsing
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE TupleSections #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
@@ -17,7 +16,6 @@ module Text.Pandoc.Readers.Org.Meta
|
||||
, metaLine
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Text.Pandoc.Readers.Org.BlockStarts
|
||||
import Text.Pandoc.Readers.Org.ExportSettings (exportSettings)
|
||||
import Text.Pandoc.Readers.Org.Inlines
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
@@ -39,7 +38,6 @@ module Text.Pandoc.Readers.Org.ParserState
|
||||
, optionsToParserState
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Control.Monad.Reader (ReaderT, asks, local)
|
||||
|
||||
import Data.Default (Default (..))
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user