diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-03-19 10:11:08 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-03-19 10:11:08 -0700 |
commit | a31731b8e2825c5bc8d7fcc9a61ce92b9d28d040 (patch) | |
tree | 9d0bd633534e65ea22a93d4c7158bc85c8a47d00 | |
parent | 3428248debb14066e7fb1ef216927d3d62e3a43a (diff) | |
download | pandoc-a31731b8e2825c5bc8d7fcc9a61ce92b9d28d040.tar.gz |
Docx reader: Don't reimplement NonEmpty.
-rw-r--r-- | src/Text/Pandoc/Readers/Docx.hs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Readers/Docx.hs b/src/Text/Pandoc/Readers/Docx.hs index 00de6a0cd..22dd54193 100644 --- a/src/Text/Pandoc/Readers/Docx.hs +++ b/src/Text/Pandoc/Readers/Docx.hs @@ -85,6 +85,7 @@ import Text.Pandoc.Class.PandocMonad (PandocMonad) import qualified Text.Pandoc.Class.PandocMonad as P import Text.Pandoc.Error import Text.Pandoc.Logging +import Data.List.NonEmpty (nonEmpty) readDocx :: PandocMonad m => ReaderOptions @@ -648,11 +649,6 @@ bodyPartToBlocks (Tbl cap _ look parts@(r:rs)) = do cells <- mapM rowToBlocksList rows let width = maybe 0 maximum $ nonEmpty $ map rowLength parts - -- Data.List.NonEmpty is not available with ghc 7.10 so we roll out - -- our own, see - -- https://github.com/jgm/pandoc/pull/4361#issuecomment-365416155 - nonEmpty [] = Nothing - nonEmpty l = Just l rowLength :: Docx.Row -> Int rowLength (Docx.Row c) = length c |