Skip to content
Snippets Groups Projects
Commit 532075b3 authored by Ryan Scott's avatar Ryan Scott
Browse files

Migrate patches to latest Hackage versions

parent d67e81d1
No related branches found
No related tags found
No related merge requests found
diff --git a/src/Data/List/Extra.hs b/src/Data/List/Extra.hs
index 4b4fbe5..4d98d2f 100644
index 68cbbcb..2222618 100644
--- a/src/Data/List/Extra.hs
+++ b/src/Data/List/Extra.hs
@@ -1,4 +1,5 @@
-{-# LANGUAGE TupleSections, ConstraintKinds #-}
+{-# LANGUAGE TupleSections, ConstraintKinds, CPP #-}
+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
-- | This module extends "Data.List" with extra functions of a similar nature.
-- The package also exports the existing "Data.List" functions.
@@ -45,7 +46,7 @@ import Data.Char
@@ -45,7 +45,6 @@ import Data.Char
import Data.Tuple.Extra
import Data.Monoid
import Numeric
-import Data.Functor
+import Data.Functor hiding (unzip)
import Data.Foldable
import Prelude
import Data.List.NonEmpty (NonEmpty ((:|)))
@@ -156,6 +157,7 @@ lastDef :: a -> [a] -> a
@@ -156,7 +155,7 @@ lastDef :: a -> [a] -> a
lastDef d xs = foldl (\_ x -> x) d xs -- I know this looks weird, but apparently this is the fastest way to do this: https://hackage.haskell.org/package/base-4.12.0.0/docs/src/GHC.List.html#last
{-# INLINE lastDef #-}
-#if !MIN_VERSION_base(4,19,0)
+#if __GLASGOW_HASKELL__ < 907
-- | A total variant of the list index function `(!!)`.
--
-- > [2,3,4] !? 1 == Just 3
@@ -169,6 +171,7 @@ xs !? n
0 -> Just x
_ -> r (k-1)) (const Nothing) xs n
{-# INLINABLE (!?) #-}
+#endif
-- | A composition of 'not' and 'null'.
--
This diff is collapsed.
diff --git a/src/Futhark/CLI/Literate.hs b/src/Futhark/CLI/Literate.hs
index cbdc3e1..9e13b5e 100644
--- a/src/Futhark/CLI/Literate.hs
+++ b/src/Futhark/CLI/Literate.hs
@@ -10,7 +10,7 @@ import Data.Bits
import Data.ByteString qualified as BS
import Data.ByteString.Lazy qualified as LBS
import Data.Char
-import Data.Functor
+import Data.Functor (($>))
import Data.Int (Int64)
import Data.List (foldl', transpose)
import Data.Map qualified as M
diff --git a/src/Test/Hspec/Core/Compat.hs b/src/Test/Hspec/Core/Compat.hs
index f8e82bf..eea20ae 100644
index fef998b..7affc03 100644
--- a/src/Test/Hspec/Core/Compat.hs
+++ b/src/Test/Hspec/Core/Compat.hs
@@ -25,7 +25,7 @@ import System.Exit
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment