summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/App
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2022-10-19 12:46:15 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2022-10-19 12:46:15 -0700
commitec278d2b60e329040c712b51c32fddbcd180191b (patch)
treee05ef4bd816c1c5e9afc5a8deed8b68f55865999 /src/Text/Pandoc/App
parentfe137c9d403b78eb508c6514c9234eb8fe4d77d1 (diff)
Text.Pandoc.Shared: remove `ordNub` [API change].
This is just `nubOrd` from Data.Containers.ListUtils.
Diffstat (limited to 'src/Text/Pandoc/App')
-rw-r--r--src/Text/Pandoc/App/CommandLineOptions.hs5
-rw-r--r--src/Text/Pandoc/App/Opt.hs5
2 files changed, 6 insertions, 4 deletions
diff --git a/src/Text/Pandoc/App/CommandLineOptions.hs b/src/Text/Pandoc/App/CommandLineOptions.hs
index 771569f9b..b57a16fc6 100644
--- a/src/Text/Pandoc/App/CommandLineOptions.hs
+++ b/src/Text/Pandoc/App/CommandLineOptions.hs
@@ -25,6 +25,7 @@ module Text.Pandoc.App.CommandLineOptions (
import Control.Monad
import Control.Monad.Trans
import Control.Monad.State.Strict
+import Data.Containers.ListUtils (nubOrd)
import Data.Aeson.Encode.Pretty (encodePretty', Config(..), keyOrder,
defConfig, Indent(..), NumberFormat(..))
import Data.Bifunctor (second)
@@ -50,7 +51,7 @@ import Text.Pandoc.App.Opt (Opt (..), LineEnding (..), IpynbOutput (..),
fullDefaultsPath)
import Text.Pandoc.Filter (Filter (..))
import Text.Pandoc.Highlighting (highlightingStyles, lookupHighlightingStyle)
-import Text.Pandoc.Shared (ordNub, safeStrRead)
+import Text.Pandoc.Shared (safeStrRead)
import Text.Printf
import qualified Control.Exception as E
import qualified Data.ByteString as BS
@@ -115,7 +116,7 @@ engines = map ("html",) htmlEngines ++
]
pdfEngines :: [String]
-pdfEngines = ordNub $ map snd engines
+pdfEngines = nubOrd $ map snd engines
-- | A list of functions, each transforming the options data structure
-- in response to a command-line option.
diff --git a/src/Text/Pandoc/App/Opt.hs b/src/Text/Pandoc/App/Opt.hs
index 9ecf7e7ae..710df3200 100644
--- a/src/Text/Pandoc/App/Opt.hs
+++ b/src/Text/Pandoc/App/Opt.hs
@@ -43,7 +43,8 @@ import Text.Pandoc.Options (TopLevelDivision (TopLevelDefault),
import Text.Pandoc.Class (readFileStrict, fileExists, setVerbosity, report,
PandocMonad(lookupEnv), getUserDataDir)
import Text.Pandoc.Error (PandocError (PandocParseError, PandocSomeError))
-import Text.Pandoc.Shared (findM, ordNub)
+import Text.Pandoc.Shared (findM)
+import Data.Containers.ListUtils (nubOrd)
import Text.Pandoc.Data (defaultUserDataDir)
import qualified Text.Pandoc.Parsing as P
import Text.Pandoc.Readers.Metadata (yamlMap)
@@ -816,4 +817,4 @@ expand ps ns n = concatMap (ext n ns) ps
cyclic :: Ord a => [[a]] -> Bool
cyclic = any hasDuplicate
where
- hasDuplicate xs = length (ordNub xs) /= length xs
+ hasDuplicate xs = length (nubOrd xs) /= length xs