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:
Albert Krewinkel 2020-03-15 17:45:44 +01:00 committed by GitHub
parent 76705dfeb0
commit a5fa55969f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
160 changed files with 33 additions and 353 deletions

View file

@ -377,7 +377,8 @@ flag trypandoc
Default: False
library
build-depends: base >= 4.9 && < 5,
build-depends: base-noprelude >= 4.9 && < 5,
base-compat >= 0.9,
syb >= 0.1 && < 0.8,
containers >= 0.4.2.1 && < 0.7,
unordered-containers >= 0.2 && < 0.3,
@ -440,10 +441,6 @@ library
build-depends: basement >= 0.0.10,
foundation >= 0.0.23
-- 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)
cpp-options: -D_WINDOWS
else
@ -471,7 +468,8 @@ library
default-language: Haskell2010
other-extensions: NoImplicitPrelude
hs-source-dirs: src
hs-source-dirs: src,
prelude
exposed-modules: Text.Pandoc,
Text.Pandoc.App,
@ -565,7 +563,8 @@ library
Text.Pandoc.ImageSize,
Text.Pandoc.BCP47,
Text.Pandoc.Class
other-modules: Text.Pandoc.App.CommandLineOptions,
other-modules: Prelude,
Text.Pandoc.App.CommandLineOptions,
Text.Pandoc.App.FormatHeuristics,
Text.Pandoc.App.Opt,
Text.Pandoc.App.OutputSettings,
@ -640,19 +639,19 @@ library
buildable: True
executable pandoc
build-depends: pandoc, base >= 4.8 && < 5
if impl(ghc < 8.4)
hs-source-dirs: prelude
other-modules: Prelude
build-depends: base-compat >= 0.9
build-depends: pandoc,
base-noprelude >= 4.8 && < 5,
base-compat >= 0.9
if flag(static)
ld-options: -static
default-language: Haskell2010
other-extensions: NoImplicitPrelude
hs-source-dirs: .
prelude
main-is: pandoc.hs
buildable: True
other-modules: Paths_pandoc
other-modules: Paths_pandoc,
Prelude
ghc-options: -rtsopts -with-rtsopts=-K16m -threaded
-Wall -fno-warn-unused-do-bind
-Wincomplete-record-updates
@ -667,19 +666,16 @@ executable pandoc
executable trypandoc
main-is: trypandoc.hs
hs-source-dirs: trypandoc
hs-source-dirs: trypandoc, prelude
default-language: Haskell2010
other-extensions: NoImplicitPrelude
other-modules: Prelude
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
buildable: True
else
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
-Wall -fno-warn-unused-do-bind
-Wincomplete-record-updates
@ -695,18 +691,16 @@ executable trypandoc
benchmark weigh-pandoc
type: exitcode-stdio-1.0
main-is: weigh-pandoc.hs
hs-source-dirs: benchmark
hs-source-dirs: benchmark,
prelude
build-depends: pandoc,
base >= 4.8 && < 5,
base-noprelude >= 4.8 && < 5,
base-compat >= 0.9,
text,
weigh >= 0.0 && < 0.1,
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
other-extensions: NoImplicitPrelude
other-modules: Prelude
ghc-options: -rtsopts -with-rtsopts=-K16m -threaded
-Wall -fno-warn-unused-do-bind
-Wincomplete-record-updates
@ -723,8 +717,10 @@ benchmark weigh-pandoc
test-suite test-pandoc
type: exitcode-stdio-1.0
main-is: test-pandoc.hs
hs-source-dirs: test
build-depends: base >= 4.8 && < 5,
hs-source-dirs: test,
prelude
build-depends: base-noprelude >= 4.8 && < 5,
base-compat >= 0.9,
pandoc,
pandoc-types >= 1.20 && < 1.21,
mtl >= 2.2 && < 2.3,
@ -750,11 +746,8 @@ test-suite test-pandoc
xml >= 1.3.12 && < 1.4,
doctemplates >= 0.8 && < 0.9,
Glob >= 0.7 && < 0.11
if impl(ghc < 8.4)
hs-source-dirs: prelude
other-modules: Prelude
build-depends: base-compat >= 0.9
other-modules: Tests.Old
other-modules: Prelude
Tests.Old
Tests.Command
Tests.Helpers
Tests.Lua
@ -809,7 +802,6 @@ test-suite test-pandoc
if os(windows)
cpp-options: -D_WINDOWS
default-language: Haskell2010
other-extensions: NoImplicitPrelude
ghc-options: -rtsopts -with-rtsopts=-K16m -threaded
-Wall -fno-warn-unused-do-bind
-Wincomplete-record-updates
@ -826,19 +818,17 @@ test-suite test-pandoc
benchmark benchmark-pandoc
type: exitcode-stdio-1.0
main-is: benchmark-pandoc.hs
hs-source-dirs: benchmark
hs-source-dirs: benchmark,
prelude
build-depends: pandoc,
time, bytestring, containers,
base >= 4.8 && < 5,
base-noprelude >= 4.8 && < 5,
base-compat >= 0.9,
text >= 1.1.1.0 && < 1.3,
mtl >= 2.2 && < 2.3,
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
other-extensions: NoImplicitPrelude
other-modules: Prelude
ghc-options: -rtsopts -with-rtsopts=-K16m -threaded
-Wall -fno-warn-unused-do-bind
-Wincomplete-record-updates

View file

@ -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

View file

@ -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

View file

@ -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)
@ -32,7 +30,7 @@ import Data.Bifunctor (second)
import Data.Char (toLower)
import Data.List (intercalate, sort)
#ifdef _WINDOWS
#if MIN_VERSION_base(4,12,0)
#if MIN_VERSION_base_noprelude(4,12,0)
import Data.List (isPrefixOf)
#endif
#endif
@ -1030,7 +1028,7 @@ setVariable key val (Context ctx) = Context $ M.alter go key ctx
-- beginning with \\ to \\?\UNC\. -- See #5127.
normalizePath :: FilePath -> FilePath
#ifdef _WINDOWS
#if MIN_VERSION_base(4,12,0)
#if MIN_VERSION_base_noprelude(4,12,0)
normalizePath fp =
if "\\\\" `isPrefixOf` fp && not ("\\\\?\\" `isPrefixOf` fp)
then "\\\\?\\UNC\\" ++ drop 2 fp

View file

@ -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)

View file

@ -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)

View file

@ -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(..))

View file

@ -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

View file

@ -1,5 +1,4 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoImplicitPrelude #-}
{- |
Module : Text.Pandoc.BCP47
Copyright : Copyright (C) 20172020 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

View file

@ -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

View file

@ -1,4 +1,3 @@
{-# LANGUAGE NoImplicitPrelude #-}
{- |
Module : Text.Pandoc.CSV
Copyright : Copyright (C) 20172020 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

View file

@ -1,4 +1,3 @@
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE DeriveFunctor #-}

View file

@ -1,4 +1,3 @@
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
@ -53,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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -1,4 +1,3 @@
{-# LANGUAGE NoImplicitPrelude #-}
{- |
Module : Text.Pandoc.Lua
Copyright : Copyright © 20172020 Albert Krewinkel

View file

@ -1,5 +1,4 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoImplicitPrelude #-}
{- |
Module : Text.Pandoc.Lua.Filter
Copyright : © 20122020 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)

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -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,

View file

@ -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)

View file

@ -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 (..))

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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,

View file

@ -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 (..))

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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)

View file

@ -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 )

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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)

View file

@ -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,

View file

@ -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 (..))

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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 ((<|>))

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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)

View file

@ -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 )

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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)

View file

@ -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(..))

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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 = ()

View file

@ -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
--

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -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

Some files were not shown because too many files have changed in this diff Show more