haskellPackages.cheapskate: unbreak

This commit is contained in:
t4ccer
2024-03-19 15:07:53 -06:00
parent 73aeb19386
commit eaf992fa45
3 changed files with 29 additions and 1 deletions
@@ -1695,6 +1695,12 @@ self: super: {
(appendPatches [./patches/pattern-arrows-add-fix-import.patch])
];
# 2024-03-19: Fix for mtl >= 2.3
cheapskate = lib.pipe super.cheapskate [
doJailbreak
(appendPatches [./patches/cheapskate-mtl-2-3-support.patch])
];
# 2020-06-24: Tests are broken in hackage distribution.
# See: https://github.com/robstewart57/rdf4h/issues/39
rdf4h = dontCheck super.rdf4h;
@@ -745,7 +745,6 @@ broken-packages:
- chatty-text # failure in job https://hydra.nixos.org/build/233199498 at 2023-09-02
- chatty-utils # failure in job https://hydra.nixos.org/build/252710715 at 2024-03-16
- chatwork # failure in job https://hydra.nixos.org/build/233240489 at 2023-09-02
- cheapskate # failure in job https://hydra.nixos.org/build/233197892 at 2023-09-02
- check-cfg-ambiguity # failure in job https://hydra.nixos.org/build/233251852 at 2023-09-02
- checked # failure in job https://hydra.nixos.org/build/233223182 at 2023-09-02
- Checked # failure in job https://hydra.nixos.org/build/233257598 at 2023-09-02
@@ -0,0 +1,23 @@
diff --git a/Cheapskate/Parse.hs b/Cheapskate/Parse.hs
index b90d8e5..2925132 100644
--- a/Cheapskate/Parse.hs
+++ b/Cheapskate/Parse.hs
@@ -1,4 +1,5 @@
{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE CPP #-}
module Cheapskate.Parse (
markdown
) where
@@ -21,6 +22,12 @@ import Control.Applicative
import qualified Data.Map as M
import Data.List (intercalate)
+#if MIN_VERSION_mtl(2, 3, 0)
+import Control.Monad (guard, unless, replicateM)
+#else
+#endif
+
+
import Debug.Trace
-- | Parses the input as a markdown document. Note that 'Doc' is an instance