From f0e4b9cc3cde01d64e25d331c5b4f3d62d2129b5 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 18 Mar 2021 21:37:56 -0700 Subject: [PATCH] Require safe >= 0.3.18 and remove cpp. --- pandoc.cabal | 2 +- src/Text/Pandoc/Readers/LaTeX.hs | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/pandoc.cabal b/pandoc.cabal index 5936d113f..e46518e96 100644 --- a/pandoc.cabal +++ b/pandoc.cabal @@ -477,7 +477,7 @@ library parsec >= 3.1 && < 3.2, process >= 1.2.3 && < 1.7, random >= 1 && < 1.3, - safe >= 0.3 && < 0.4, + safe >= 0.3.18 && < 0.4, scientific >= 0.3 && < 0.4, skylighting >= 0.10.4.1 && < 0.11, skylighting-core >= 0.10.4.1 && < 0.11, diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index ceac261d2..21a563bed 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE ScopedTypeVariables #-} @@ -97,11 +96,7 @@ parseLaTeX = do let doc' = doc bs let headerLevel (Header n _ _) = [n] headerLevel _ = [] -#if MIN_VERSION_safe(0,3,18) let bottomLevel = minimumBound 1 $ query headerLevel doc' -#else - let bottomLevel = minimumDef 1 $ query headerLevel doc' -#endif let adjustHeaders m (Header n attr ils) = Header (n+m) attr ils adjustHeaders _ x = x let (Pandoc _ bs') =