mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-02 10:52:57 +02:00
stack: update to 3.7.1.
This commit is contained in:
parent
010faa4ea5
commit
20b0322fa3
16 changed files with 522 additions and 534 deletions
|
@ -1 +1,2 @@
|
|||
hostmakedepends+=" ghc stack"
|
||||
build_helper+=" haskell"
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
From 2738929ce15b4c8704bbbac24a08539b5d4bf30e Mon Sep 17 00:00:00 2001
|
||||
From: sternenseemann <sternenseemann@systemli.org>
|
||||
Date: Mon, 14 Aug 2023 10:51:30 +0200
|
||||
Subject: [PATCH] Data.Memory.Internal.CompatPrim64: fix 32 bit with GHC >= 9.4
|
||||
|
||||
Since 9.4, GHC.Prim exports Word64# operations like timesWord64# even on
|
||||
i686 whereas GHC.IntWord64 no longer exists. Therefore, we can just use
|
||||
the ready made solution.
|
||||
|
||||
Closes #98, as it should be the better solution.
|
||||
---
|
||||
Data/Memory/Internal/CompatPrim64.hs | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/Data/Memory/Internal/CompatPrim64.hs b/Data/Memory/Internal/CompatPrim64.hs
|
||||
index b9eef8a..a134c88 100644
|
||||
--- a/memory/Data/Memory/Internal/CompatPrim64.hs
|
||||
+++ b/memory/Data/Memory/Internal/CompatPrim64.hs
|
||||
@@ -150,6 +150,7 @@ w64# :: Word# -> Word# -> Word# -> Word64#
|
||||
w64# w _ _ = w
|
||||
|
||||
#elif WORD_SIZE_IN_BITS == 32
|
||||
+#if __GLASGOW_HASKELL__ < 904
|
||||
import GHC.IntWord64
|
||||
import GHC.Prim (Word#)
|
||||
|
||||
@@ -158,6 +159,9 @@ timesWord64# a b =
|
||||
let !ai = word64ToInt64# a
|
||||
!bi = word64ToInt64# b
|
||||
in int64ToWord64# (timesInt64# ai bi)
|
||||
+#else
|
||||
+import GHC.Prim
|
||||
+#endif
|
||||
|
||||
w64# :: Word# -> Word# -> Word# -> Word64#
|
||||
w64# _ hw lw =
|
|
@ -0,0 +1,242 @@
|
|||
From 38be2c93acb6f459d24ed6c626981c35ccf44095 Mon Sep 17 00:00:00 2001
|
||||
From: Sylvain Henry <sylvain@haskus.fr>
|
||||
Date: Thu, 16 Feb 2023 15:40:45 +0100
|
||||
Subject: [PATCH] Fix build on 32-bit architectures
|
||||
|
||||
---
|
||||
basement/Basement/Bits.hs | 4 ++++
|
||||
basement/Basement/From.hs | 24 -----------------------
|
||||
basement/Basement/Numerical/Additive.hs | 4 ++++
|
||||
basement/Basement/Numerical/Conversion.hs | 20 +++++++++++++++++++
|
||||
basement/Basement/PrimType.hs | 6 +++++-
|
||||
basement/Basement/Types/OffsetSize.hs | 22 +++++++++++++++++++--
|
||||
6 files changed, 53 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/basement/Basement/Bits.hs b/basement/Basement/Bits.hs
|
||||
index 7eeea0f5..24520ed7 100644
|
||||
--- a/basement/Basement/Bits.hs
|
||||
+++ b/basement/Basement/Bits.hs
|
||||
@@ -54,8 +54,12 @@ import GHC.Int
|
||||
import Basement.Compat.Primitive
|
||||
|
||||
#if WORD_SIZE_IN_BITS < 64
|
||||
+#if __GLASGOW_HASKELL__ >= 904
|
||||
+import GHC.Exts
|
||||
+#else
|
||||
import GHC.IntWord64
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
-- | operation over finite bits
|
||||
class FiniteBitsOps bits where
|
||||
diff --git a/basement/Basement/From.hs b/basement/Basement/From.hs
|
||||
index 7bbe141c..80014b3e 100644
|
||||
--- a/basement/Basement/From.hs
|
||||
+++ b/basement/Basement/From.hs
|
||||
@@ -272,23 +272,11 @@ instance (NatWithinBound (CountOf ty) n, KnownNat n, PrimType ty)
|
||||
tryFrom = BlockN.toBlockN . UArray.toBlock . BoxArray.mapToUnboxed id
|
||||
|
||||
instance (KnownNat n, NatWithinBound Word8 n) => From (Zn64 n) Word8 where
|
||||
-#if __GLASGOW_HASKELL__ >= 904
|
||||
- from = narrow . unZn64 where narrow (W64# w) = W8# (wordToWord8# (word64ToWord# (GHC.Prim.word64ToWord# w)))
|
||||
-#else
|
||||
from = narrow . unZn64 where narrow (W64# w) = W8# (wordToWord8# (word64ToWord# w))
|
||||
-#endif
|
||||
instance (KnownNat n, NatWithinBound Word16 n) => From (Zn64 n) Word16 where
|
||||
-#if __GLASGOW_HASKELL__ >= 904
|
||||
- from = narrow . unZn64 where narrow (W64# w) = W16# (wordToWord16# (word64ToWord# (GHC.Prim.word64ToWord# w)))
|
||||
-#else
|
||||
from = narrow . unZn64 where narrow (W64# w) = W16# (wordToWord16# (word64ToWord# w))
|
||||
-#endif
|
||||
instance (KnownNat n, NatWithinBound Word32 n) => From (Zn64 n) Word32 where
|
||||
-#if __GLASGOW_HASKELL__ >= 904
|
||||
- from = narrow . unZn64 where narrow (W64# w) = W32# (wordToWord32# (word64ToWord# (GHC.Prim.word64ToWord# w)))
|
||||
-#else
|
||||
from = narrow . unZn64 where narrow (W64# w) = W32# (wordToWord32# (word64ToWord# w))
|
||||
-#endif
|
||||
instance From (Zn64 n) Word64 where
|
||||
from = unZn64
|
||||
instance From (Zn64 n) Word128 where
|
||||
@@ -297,23 +285,11 @@ instance From (Zn64 n) Word256 where
|
||||
from = from . unZn64
|
||||
|
||||
instance (KnownNat n, NatWithinBound Word8 n) => From (Zn n) Word8 where
|
||||
-#if __GLASGOW_HASKELL__ >= 904
|
||||
- from = narrow . naturalToWord64 . unZn where narrow (W64# w) = W8# (wordToWord8# (word64ToWord# (GHC.Prim.word64ToWord# w)))
|
||||
-#else
|
||||
from = narrow . naturalToWord64 . unZn where narrow (W64# w) = W8# (wordToWord8# (word64ToWord# w))
|
||||
-#endif
|
||||
instance (KnownNat n, NatWithinBound Word16 n) => From (Zn n) Word16 where
|
||||
-#if __GLASGOW_HASKELL__ >= 904
|
||||
- from = narrow . naturalToWord64 . unZn where narrow (W64# w) = W16# (wordToWord16# (word64ToWord# (GHC.Prim.word64ToWord# w)))
|
||||
-#else
|
||||
from = narrow . naturalToWord64 . unZn where narrow (W64# w) = W16# (wordToWord16# (word64ToWord# w))
|
||||
-#endif
|
||||
instance (KnownNat n, NatWithinBound Word32 n) => From (Zn n) Word32 where
|
||||
-#if __GLASGOW_HASKELL__ >= 904
|
||||
- from = narrow . naturalToWord64 . unZn where narrow (W64# w) = W32# (wordToWord32# (word64ToWord# (GHC.Prim.word64ToWord# w)))
|
||||
-#else
|
||||
from = narrow . naturalToWord64 . unZn where narrow (W64# w) = W32# (wordToWord32# (word64ToWord# w))
|
||||
-#endif
|
||||
instance (KnownNat n, NatWithinBound Word64 n) => From (Zn n) Word64 where
|
||||
from = naturalToWord64 . unZn
|
||||
instance (KnownNat n, NatWithinBound Word128 n) => From (Zn n) Word128 where
|
||||
diff --git a/basement/Basement/Numerical/Additive.hs b/basement/Basement/Numerical/Additive.hs
|
||||
index d0dfb973..8ab65aa0 100644
|
||||
--- a/basement/Basement/Numerical/Additive.hs
|
||||
+++ b/basement/Basement/Numerical/Additive.hs
|
||||
@@ -30,8 +30,12 @@ import qualified Basement.Types.Word128 as Word128
|
||||
import qualified Basement.Types.Word256 as Word256
|
||||
|
||||
#if WORD_SIZE_IN_BITS < 64
|
||||
+#if __GLASGOW_HASKELL__ >= 904
|
||||
+import GHC.Exts
|
||||
+#else
|
||||
import GHC.IntWord64
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
-- | Represent class of things that can be added together,
|
||||
-- contains a neutral element and is commutative.
|
||||
diff --git a/basement/Basement/Numerical/Conversion.hs b/basement/Basement/Numerical/Conversion.hs
|
||||
index db502c07..fddc8232 100644
|
||||
--- a/basement/Basement/Numerical/Conversion.hs
|
||||
+++ b/basement/Basement/Numerical/Conversion.hs
|
||||
@@ -26,8 +26,12 @@ import GHC.Word
|
||||
import Basement.Compat.Primitive
|
||||
|
||||
#if WORD_SIZE_IN_BITS < 64
|
||||
+#if __GLASGOW_HASKELL__ >= 904
|
||||
+import GHC.Exts
|
||||
+#else
|
||||
import GHC.IntWord64
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
intToInt64 :: Int -> Int64
|
||||
#if WORD_SIZE_IN_BITS == 64
|
||||
@@ -96,11 +100,22 @@ int64ToWord64 (I64# i) = W64# (int64ToWord64# i)
|
||||
#endif
|
||||
|
||||
#if WORD_SIZE_IN_BITS == 64
|
||||
+#if __GLASGOW_HASKELL__ >= 904
|
||||
+word64ToWord# :: Word64# -> Word#
|
||||
+word64ToWord# i = word64ToWord# i
|
||||
+#else
|
||||
word64ToWord# :: Word# -> Word#
|
||||
word64ToWord# i = i
|
||||
+#endif
|
||||
{-# INLINE word64ToWord# #-}
|
||||
#endif
|
||||
|
||||
+#if WORD_SIZE_IN_BITS < 64
|
||||
+word64ToWord32# :: Word64# -> Word32#
|
||||
+word64ToWord32# i = wordToWord32# (word64ToWord# i)
|
||||
+{-# INLINE word64ToWord32# #-}
|
||||
+#endif
|
||||
+
|
||||
-- | 2 Word32s
|
||||
data Word32x2 = Word32x2 {-# UNPACK #-} !Word32
|
||||
{-# UNPACK #-} !Word32
|
||||
@@ -113,9 +128,14 @@ word64ToWord32s (W64# w64) = Word32x2 (W32# (wordToWord32# (uncheckedShiftRL# (G
|
||||
word64ToWord32s (W64# w64) = Word32x2 (W32# (wordToWord32# (uncheckedShiftRL# w64 32#))) (W32# (wordToWord32# w64))
|
||||
#endif
|
||||
#else
|
||||
+#if __GLASGOW_HASKELL__ >= 904
|
||||
+word64ToWord32s :: Word64 -> Word32x2
|
||||
+word64ToWord32s (W64# w64) = Word32x2 (W32# (word64ToWord32# (uncheckedShiftRL64# w64 32#))) (W32# (word64ToWord32# w64))
|
||||
+#else
|
||||
word64ToWord32s :: Word64 -> Word32x2
|
||||
word64ToWord32s (W64# w64) = Word32x2 (W32# (word64ToWord# (uncheckedShiftRL64# w64 32#))) (W32# (word64ToWord# w64))
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
wordToChar :: Word -> Char
|
||||
wordToChar (W# word) = C# (chr# (word2Int# word))
|
||||
diff --git a/basement/Basement/PrimType.hs b/basement/Basement/PrimType.hs
|
||||
index f8ca2926..a888ec91 100644
|
||||
--- a/basement/Basement/PrimType.hs
|
||||
+++ b/basement/Basement/PrimType.hs
|
||||
@@ -54,7 +54,11 @@ import Basement.Nat
|
||||
import qualified Prelude (quot)
|
||||
|
||||
#if WORD_SIZE_IN_BITS < 64
|
||||
-import GHC.IntWord64
|
||||
+#if __GLASGOW_HASKELL__ >= 904
|
||||
+import GHC.Exts
|
||||
+#else
|
||||
+import GHC.IntWord64
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
#ifdef FOUNDATION_BOUNDS_CHECK
|
||||
diff --git a/basement/Basement/Types/OffsetSize.hs b/basement/Basement/Types/OffsetSize.hs
|
||||
index cd944927..1ea80dad 100644
|
||||
--- a/basement/Basement/Types/OffsetSize.hs
|
||||
+++ b/basement/Basement/Types/OffsetSize.hs
|
||||
@@ -70,8 +70,12 @@ import Data.List (foldl')
|
||||
import qualified Prelude
|
||||
|
||||
#if WORD_SIZE_IN_BITS < 64
|
||||
+#if __GLASGOW_HASKELL__ >= 904
|
||||
+import GHC.Exts
|
||||
+#else
|
||||
import GHC.IntWord64
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
-- | File size in bytes
|
||||
newtype FileSize = FileSize Word64
|
||||
@@ -225,20 +229,26 @@ countOfRoundUp alignment (CountOf n) = CountOf ((n + (alignment-1)) .&. compleme
|
||||
|
||||
csizeOfSize :: CountOf Word8 -> CSize
|
||||
#if WORD_SIZE_IN_BITS < 64
|
||||
+#if __GLASGOW_HASKELL__ >= 904
|
||||
+csizeOfSize (CountOf (I# sz)) = CSize (W32# (wordToWord32# (int2Word# sz)))
|
||||
+#else
|
||||
csizeOfSize (CountOf (I# sz)) = CSize (W32# (int2Word# sz))
|
||||
+#endif
|
||||
#else
|
||||
#if __GLASGOW_HASKELL__ >= 904
|
||||
csizeOfSize (CountOf (I# sz)) = CSize (W64# (wordToWord64# (int2Word# sz)))
|
||||
-
|
||||
#else
|
||||
csizeOfSize (CountOf (I# sz)) = CSize (W64# (int2Word# sz))
|
||||
-
|
||||
#endif
|
||||
#endif
|
||||
|
||||
csizeOfOffset :: Offset8 -> CSize
|
||||
#if WORD_SIZE_IN_BITS < 64
|
||||
+#if __GLASGOW_HASKELL__ >= 904
|
||||
+csizeOfOffset (Offset (I# sz)) = CSize (W32# (wordToWord32# (int2Word# sz)))
|
||||
+#else
|
||||
csizeOfOffset (Offset (I# sz)) = CSize (W32# (int2Word# sz))
|
||||
+#endif
|
||||
#else
|
||||
#if __GLASGOW_HASKELL__ >= 904
|
||||
csizeOfOffset (Offset (I# sz)) = CSize (W64# (wordToWord64# (int2Word# sz)))
|
||||
@@ -250,7 +260,11 @@ csizeOfOffset (Offset (I# sz)) = CSize (W64# (int2Word# sz))
|
||||
sizeOfCSSize :: CSsize -> CountOf Word8
|
||||
sizeOfCSSize (CSsize (-1)) = error "invalid size: CSSize is -1"
|
||||
#if WORD_SIZE_IN_BITS < 64
|
||||
+#if __GLASGOW_HASKELL__ >= 904
|
||||
+sizeOfCSSize (CSsize (I32# sz)) = CountOf (I# (int32ToInt# sz))
|
||||
+#else
|
||||
sizeOfCSSize (CSsize (I32# sz)) = CountOf (I# sz)
|
||||
+#endif
|
||||
#else
|
||||
#if __GLASGOW_HASKELL__ >= 904
|
||||
sizeOfCSSize (CSsize (I64# sz)) = CountOf (I# (int64ToInt# sz))
|
||||
@@ -261,7 +275,11 @@ sizeOfCSSize (CSsize (I64# sz)) = CountOf (I# sz)
|
||||
|
||||
sizeOfCSize :: CSize -> CountOf Word8
|
||||
#if WORD_SIZE_IN_BITS < 64
|
||||
+#if __GLASGOW_HASKELL__ >= 904
|
||||
+sizeOfCSize (CSize (W32# sz)) = CountOf (I# (word2Int# (word32ToWord# sz)))
|
||||
+#else
|
||||
sizeOfCSize (CSize (W32# sz)) = CountOf (I# (word2Int# sz))
|
||||
+#endif
|
||||
#else
|
||||
#if __GLASGOW_HASKELL__ >= 904
|
||||
sizeOfCSize (CSize (W64# sz)) = CountOf (I# (word2Int# (word64ToWord# sz)))
|
|
@ -1,46 +0,0 @@
|
|||
commit 09e233ed73aa3335642f97c080ef27e42047c527
|
||||
Author: q66 <daniel@octaforge.org>
|
||||
Date: Fri Mar 11 04:37:15 2022 +0100
|
||||
|
||||
constrain aeson to prevent build failures
|
||||
|
||||
diff --git a/stack.cabal b/stack.cabal
|
||||
index dba5bf0..0195f2c 100644
|
||||
--- a/stack.cabal
|
||||
+++ b/stack.cabal
|
||||
@@ -231,7 +231,7 @@ library
|
||||
|
||||
build-depends:
|
||||
Cabal >=3.2.1.0,
|
||||
- aeson >=1.5.6.0,
|
||||
+ aeson >=1.5.6.0 && <1.6,
|
||||
annotated-wl-pprint >=0.7.0,
|
||||
ansi-terminal >=0.10.3,
|
||||
array >=0.5.4.0,
|
||||
@@ -357,7 +357,7 @@ executable stack
|
||||
|
||||
build-depends:
|
||||
Cabal >=3.2.1.0,
|
||||
- aeson >=1.5.6.0,
|
||||
+ aeson >=1.5.6.0 && <1.6,
|
||||
annotated-wl-pprint >=0.7.0,
|
||||
ansi-terminal >=0.10.3,
|
||||
array >=0.5.4.0,
|
||||
@@ -485,7 +485,7 @@ executable stack-integration-test
|
||||
|
||||
build-depends:
|
||||
Cabal >=3.2.1.0,
|
||||
- aeson >=1.5.6.0,
|
||||
+ aeson >=1.5.6.0 && <1.6,
|
||||
annotated-wl-pprint >=0.7.0,
|
||||
ansi-terminal >=0.10.3,
|
||||
array >=0.5.4.0,
|
||||
@@ -621,7 +621,7 @@ test-suite stack-test
|
||||
build-depends:
|
||||
Cabal >=3.2.1.0,
|
||||
QuickCheck >=2.14.2,
|
||||
- aeson >=1.5.6.0,
|
||||
+ aeson >=1.5.6.0 && <1.6,
|
||||
annotated-wl-pprint >=0.7.0,
|
||||
ansi-terminal >=0.10.3,
|
||||
array >=0.5.4.0,
|
212
srcpkgs/stack/patches/cborg.patch
Normal file
212
srcpkgs/stack/patches/cborg.patch
Normal file
|
@ -0,0 +1,212 @@
|
|||
commit 9d1418bb8b38cb9a438d7f18835b1ef7ef12b234
|
||||
Author: amesgen <amesgen@amesgen.de>
|
||||
Date: Sun Sep 10 20:03:40 2023 +0200
|
||||
|
||||
Fix compilation and support GHC >=9.2 on 32bit
|
||||
|
||||
diff --git a/cborg/src/Codec/CBOR/Decoding.hs b/cborg/src/Codec/CBOR/Decoding.hs
|
||||
index a7d774c..bf68e68 100644
|
||||
--- a/cborg/src/Codec/CBOR/Decoding.hs
|
||||
+++ b/cborg/src/Codec/CBOR/Decoding.hs
|
||||
@@ -315,11 +315,16 @@ getDecodeAction (Decoder k) = k (\x -> return (Done x))
|
||||
toInt8 :: Int# -> Int8
|
||||
toInt16 :: Int# -> Int16
|
||||
toInt32 :: Int# -> Int32
|
||||
-toInt64 :: Int# -> Int64
|
||||
toWord8 :: Word# -> Word8
|
||||
toWord16 :: Word# -> Word16
|
||||
toWord32 :: Word# -> Word32
|
||||
+#if defined(ARCH_64bit)
|
||||
+toInt64 :: Int# -> Int64
|
||||
toWord64 :: Word# -> Word64
|
||||
+#else
|
||||
+toInt64 :: Int64# -> Int64
|
||||
+toWord64 :: Word64# -> Word64
|
||||
+#endif
|
||||
#if MIN_VERSION_ghc_prim(0,8,0)
|
||||
toInt8 n = I8# (intToInt8# n)
|
||||
toInt16 n = I16# (intToInt16# n)
|
||||
@@ -327,8 +332,7 @@ toInt32 n = I32# (intToInt32# n)
|
||||
toWord8 n = W8# (wordToWord8# n)
|
||||
toWord16 n = W16# (wordToWord16# n)
|
||||
toWord32 n = W32# (wordToWord32# n)
|
||||
-#if WORD_SIZE_IN_BITS == 64
|
||||
-#if MIN_VERSION_base(4,17,0)
|
||||
+#if MIN_VERSION_base(4,17,0) && defined(ARCH_64bit)
|
||||
toInt64 n = I64# (intToInt64# n)
|
||||
toWord64 n = W64# (wordToWord64# n)
|
||||
#else
|
||||
@@ -336,10 +340,6 @@ toInt64 n = I64# n
|
||||
toWord64 n = W64# n
|
||||
#endif
|
||||
#else
|
||||
-toInt64 n = I64# (intToInt64# n)
|
||||
-toWord64 n = W64# (wordToWord64# n)
|
||||
-#endif
|
||||
-#else
|
||||
toInt8 n = I8# n
|
||||
toInt16 n = I16# n
|
||||
toInt32 n = I32# n
|
||||
@@ -986,7 +986,7 @@ type ByteOffset = Int64
|
||||
-- @since 0.2.2.0
|
||||
peekByteOffset :: Decoder s ByteOffset
|
||||
peekByteOffset = Decoder (\k -> return (PeekByteOffset (\off# -> k (I64#
|
||||
-#if MIN_VERSION_base(4,17,0)
|
||||
+#if MIN_VERSION_base(4,17,0) && !defined(ARCH_32bit)
|
||||
(intToInt64# off#)
|
||||
#else
|
||||
off#
|
||||
diff --git a/cborg/src/Codec/CBOR/Magic.hs b/cborg/src/Codec/CBOR/Magic.hs
|
||||
index cdeb455..bfae638 100644
|
||||
--- a/cborg/src/Codec/CBOR/Magic.hs
|
||||
+++ b/cborg/src/Codec/CBOR/Magic.hs
|
||||
@@ -120,7 +120,7 @@ import qualified Numeric.Half as Half
|
||||
import Data.Bits ((.|.), unsafeShiftL)
|
||||
#endif
|
||||
|
||||
-#if defined(ARCH_32bit)
|
||||
+#if defined(ARCH_32bit) && !MIN_VERSION_ghc_prim(0,8,0)
|
||||
import GHC.IntWord64 (wordToWord64#, word64ToWord#,
|
||||
intToInt64#, int64ToInt#,
|
||||
leWord64#, ltWord64#, word64ToInt64#)
|
||||
@@ -173,7 +173,7 @@ grabWord64 (Ptr ip#) = W64# (wordToWord64# (byteSwap# (word64ToWord# (indexWord6
|
||||
grabWord64 (Ptr ip#) = W64# (byteSwap# (indexWord64OffAddr# ip# 0#))
|
||||
#endif
|
||||
#else
|
||||
-grabWord64 (Ptr ip#) = W64# (byteSwap64# (word64ToWord# (indexWord64OffAddr# ip# 0#)))
|
||||
+grabWord64 (Ptr ip#) = W64# (byteSwap64# (indexWord64OffAddr# ip# 0#))
|
||||
#endif
|
||||
|
||||
#elif defined(MEM_UNALIGNED_OPS) && \
|
||||
@@ -484,7 +484,7 @@ word16ToInt (W16# w#) = I# (word2Int# (word16ToWord# w#))
|
||||
word32ToInt (W32# w#) = I# (word2Int# (word32ToWord# w#))
|
||||
#else
|
||||
word32ToInt (W32# w#) =
|
||||
- case isTrue# (w# `ltWord#` 0x80000000##) of
|
||||
+ case isTrue# (word32ToWord# w# `ltWord#` 0x80000000##) of
|
||||
True -> Just (I# (word2Int# (word32ToWord# w#)))
|
||||
False -> Nothing
|
||||
#endif
|
||||
@@ -530,6 +530,19 @@ word64ToInt (W64# w#) =
|
||||
{-# INLINE word64ToInt #-}
|
||||
|
||||
#if defined(ARCH_32bit)
|
||||
+#if MIN_VERSION_ghc_prim(0,8,0)
|
||||
+word8ToInt64 (W8# w#) = I64# (intToInt64# (word2Int# (word8ToWord# w#)))
|
||||
+word16ToInt64 (W16# w#) = I64# (intToInt64# (word2Int# (word16ToWord# w#)))
|
||||
+word32ToInt64 (W32# w#) = I64# (word64ToInt64# (wordToWord64# (word32ToWord# w#)))
|
||||
+word64ToInt64 (W64# w#) =
|
||||
+ case isTrue# (w# `ltWord64#` uncheckedShiftL64# (wordToWord64# 1##) 63#) of
|
||||
+ True -> Just (I64# (word64ToInt64# w#))
|
||||
+ False -> Nothing
|
||||
+
|
||||
+word8ToWord64 (W8# w#) = W64# (wordToWord64# (word8ToWord# w#))
|
||||
+word16ToWord64 (W16# w#) = W64# (wordToWord64# (word16ToWord# w#))
|
||||
+word32ToWord64 (W32# w#) = W64# (wordToWord64# (word32ToWord# w#))
|
||||
+#else
|
||||
word8ToInt64 (W8# w#) = I64# (intToInt64# (word2Int# w#))
|
||||
word16ToInt64 (W16# w#) = I64# (intToInt64# (word2Int# w#))
|
||||
word32ToInt64 (W32# w#) = I64# (word64ToInt64# (wordToWord64# w#))
|
||||
@@ -541,6 +554,7 @@ word64ToInt64 (W64# w#) =
|
||||
word8ToWord64 (W8# w#) = W64# (wordToWord64# w#)
|
||||
word16ToWord64 (W16# w#) = W64# (wordToWord64# w#)
|
||||
word32ToWord64 (W32# w#) = W64# (wordToWord64# w#)
|
||||
+#endif
|
||||
|
||||
{-# INLINE word8ToInt64 #-}
|
||||
{-# INLINE word16ToInt64 #-}
|
||||
diff --git a/cborg/src/Codec/CBOR/Read.hs b/cborg/src/Codec/CBOR/Read.hs
|
||||
index 6546575..c4dc761 100644
|
||||
--- a/cborg/src/Codec/CBOR/Read.hs
|
||||
+++ b/cborg/src/Codec/CBOR/Read.hs
|
||||
@@ -63,7 +63,7 @@ import qualified Data.Text as T
|
||||
import qualified Data.Text.Encoding as T
|
||||
import Data.Word
|
||||
import GHC.Word
|
||||
-#if defined(ARCH_32bit)
|
||||
+#if defined(ARCH_32bit) && !MIN_VERSION_ghc_prim(0,8,0)
|
||||
import GHC.IntWord64
|
||||
#endif
|
||||
import GHC.Exts
|
||||
@@ -510,8 +510,8 @@ go_fast !bs da@(ConsumeNegWord64Canonical k) =
|
||||
go_fast !bs da@(ConsumeInt64Canonical k) =
|
||||
case tryConsumeInt64 (BS.unsafeHead bs) bs of
|
||||
DecodeFailure -> go_fast_end bs da
|
||||
- DecodedToken sz i@(I64# i#)
|
||||
- | isInt64Canonical sz i -> k i# >>= go_fast (BS.unsafeDrop sz bs)
|
||||
+ DecodedToken sz (I64# i#)
|
||||
+ | isInt64Canonical sz i# -> k i# >>= go_fast (BS.unsafeDrop sz bs)
|
||||
| otherwise -> go_fast_end bs da
|
||||
|
||||
go_fast !bs da@(ConsumeListLen64Canonical k) =
|
||||
@@ -994,8 +994,8 @@ go_fast_end !bs (ConsumeNegWord64Canonical k) =
|
||||
go_fast_end !bs (ConsumeInt64Canonical k) =
|
||||
case tryConsumeInt64 (BS.unsafeHead bs) bs of
|
||||
DecodeFailure -> return $! SlowFail bs "expected int64"
|
||||
- DecodedToken sz i@(I64# i#)
|
||||
- | isInt64Canonical sz i -> k i# >>= go_fast_end (BS.unsafeDrop sz bs)
|
||||
+ DecodedToken sz (I64# i#)
|
||||
+ | isInt64Canonical sz i# -> k i# >>= go_fast_end (BS.unsafeDrop sz bs)
|
||||
| otherwise -> return $! SlowFail bs "non-canonical int64"
|
||||
|
||||
go_fast_end !bs (ConsumeListLen64Canonical k) =
|
||||
@@ -1271,7 +1271,7 @@ go_slow da bs !offset = do
|
||||
|
||||
SlowPeekByteOffset bs' k ->
|
||||
lift
|
||||
-#if MIN_VERSION_base(4,17,0)
|
||||
+#if MIN_VERSION_base(4,17,0) && !defined(ARCH_32bit)
|
||||
(k (int64ToInt# off#))
|
||||
#else
|
||||
(k off#)
|
||||
@@ -1381,7 +1381,7 @@ go_slow_overlapped da sz bs_cur bs_next !offset =
|
||||
SlowPeekByteOffset bs_empty k ->
|
||||
assert (BS.null bs_empty) $ do
|
||||
lift
|
||||
-#if MIN_VERSION_base(4,17,0)
|
||||
+#if MIN_VERSION_base(4,17,0) && !defined(ARCH_32bit)
|
||||
(k (int64ToInt# off#))
|
||||
#else
|
||||
(k off#)
|
||||
@@ -1565,17 +1565,17 @@ isIntCanonical sz i
|
||||
{-# INLINE isWord64Canonical #-}
|
||||
isWord64Canonical :: Int -> Word64 -> Bool
|
||||
isWord64Canonical sz w
|
||||
- | sz == 2 = w > 0x17)
|
||||
- | sz == 3 = w > 0xff)
|
||||
- | sz == 5 = w > 0xffff)
|
||||
- | sz == 9 = w > 0xffffffff)
|
||||
+ | sz == 2 = w > 0x17
|
||||
+ | sz == 3 = w > 0xff
|
||||
+ | sz == 5 = w > 0xffff
|
||||
+ | sz == 9 = w > 0xffffffff
|
||||
| otherwise = True
|
||||
|
||||
{-# INLINE isInt64Canonical #-}
|
||||
isInt64Canonical :: Int -> Int64# -> Bool
|
||||
isInt64Canonical sz i#
|
||||
- | isTrue# (i# `ltInt64#` intToInt64# 0#) = isWord64Canonical sz (not64# w#)
|
||||
- | otherwise = isWord64Canonical sz w#
|
||||
+ | isTrue# (i# `ltInt64#` intToInt64# 0#) = isWord64Canonical sz (W64# (not64# w#))
|
||||
+ | otherwise = isWord64Canonical sz (W64# w#)
|
||||
where
|
||||
w# = int64ToWord64# i#
|
||||
#endif
|
||||
@@ -1796,7 +1796,7 @@ tryConsumeInteger hdr !bs = case word8ToWord hdr of
|
||||
0x1b -> let !w = eatTailWord64 bs
|
||||
sz = 9
|
||||
#if defined(ARCH_32bit)
|
||||
- in DecodedToken sz (BigIntToken (isWord64Canonical sz (word64ToWord w)) $! toInteger w)
|
||||
+ in DecodedToken sz (BigIntToken (isWord64Canonical sz w) $! toInteger w)
|
||||
#else
|
||||
in DecodedToken sz (BigIntToken (isWordCanonical sz (word64ToWord w)) $! toInteger w)
|
||||
#endif
|
||||
@@ -1838,7 +1838,7 @@ tryConsumeInteger hdr !bs = case word8ToWord hdr of
|
||||
0x3b -> let !w = eatTailWord64 bs
|
||||
sz = 9
|
||||
#if defined(ARCH_32bit)
|
||||
- in DecodedToken sz (BigIntToken (isWord64Canonical sz (word64ToWord w)) $! (-1 - toInteger w))
|
||||
+ in DecodedToken sz (BigIntToken (isWord64Canonical sz w) $! (-1 - toInteger w))
|
||||
#else
|
||||
in DecodedToken sz (BigIntToken (isWordCanonical sz (word64ToWord w)) $! (-1 - toInteger w))
|
||||
#endif
|
|
@ -1,20 +0,0 @@
|
|||
--- a/src/Stack/Build/Execute.hs
|
||||
+++ b/src/Stack/Build/Execute.hs
|
||||
@@ -26,7 +26,7 @@ import Control.Concurrent.Exec
|
||||
import Control.Concurrent.STM (check)
|
||||
import Stack.Prelude hiding (Display (..))
|
||||
import Crypto.Hash
|
||||
-import Data.Attoparsec.Text hiding (try)
|
||||
+import Data.Attoparsec.Text as P hiding (try)
|
||||
import qualified Data.ByteArray as Mem (convert)
|
||||
import qualified Data.ByteString as S
|
||||
import qualified Data.ByteString.Builder
|
||||
@@ -2160,7 +2160,7 @@ mungeBuildOutput excludeTHLoading makeAb
|
||||
lineCol = char ':'
|
||||
>> choice
|
||||
[ num >> char ':' >> num >> optional (char '-' >> num) >> return ()
|
||||
- , char '(' >> num >> char ',' >> num >> string ")-(" >> num >> char ',' >> num >> char ')' >> return ()
|
||||
+ , char '(' >> num >> char ',' >> num >> P.string ")-(" >> num >> char ',' >> num >> char ')' >> return ()
|
||||
]
|
||||
>> char ':'
|
||||
>> return ()
|
|
@ -1,16 +0,0 @@
|
|||
src/Stack/FileWatch.hs:29:49: error: Not in scope: ‘confUsePolling’
|
||||
|
|
||||
29 | fileWatchPoll = fileWatchConf $ defaultConfig { confUsePolling = True }
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
--- a/stack.cabal
|
||||
+++ b/stack.cabal
|
||||
@@ -256,7 +256,7 @@ library
|
||||
file-embed >=0.0.14.0,
|
||||
filelock >=0.1.1.5,
|
||||
filepath >=1.4.2.1,
|
||||
- fsnotify >=0.3.0.1,
|
||||
+ fsnotify >=0.3.0.1 && <0.4.0.0,
|
||||
generic-deriving >=1.13.1,
|
||||
hackage-security >=0.6.0.1,
|
||||
hashable >=1.3.0.0,
|
|
@ -1,212 +0,0 @@
|
|||
From cb7e56842a25f93142545fad21306a7c1750fbbf Mon Sep 17 00:00:00 2001
|
||||
From: Brandon Chinn <brandon@leapyear.io>
|
||||
Date: Fri, 4 Jun 2021 16:26:22 -0700
|
||||
Subject: [PATCH 1/6] Use Cabal 3.4.0.0
|
||||
|
||||
---
|
||||
stack.yaml | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/stack.yaml b/stack.yaml
|
||||
index 005bd19f4..9472509be 100644
|
||||
--- a/stack.yaml
|
||||
+++ b/stack.yaml
|
||||
@@ -20,6 +20,9 @@ flags:
|
||||
ghc-options:
|
||||
"$locals": -fhide-source-paths
|
||||
|
||||
+extra-deps:
|
||||
+- Cabal-3.4.0.0
|
||||
+
|
||||
drop-packages:
|
||||
# See https://github.com/commercialhaskell/stack/pull/4712
|
||||
- cabal-install
|
||||
|
||||
From 11e11ab0edeba033b40a7fc62434be58dea82ce2 Mon Sep 17 00:00:00 2001
|
||||
From: Brandon Chinn <brandon@leapyear.io>
|
||||
Date: Fri, 4 Jun 2021 16:40:56 -0700
|
||||
Subject: [PATCH 2/6] Fix Flag => PackageFlag
|
||||
|
||||
---
|
||||
src/Stack/BuildPlan.hs | 2 +-
|
||||
src/Stack/Package.hs | 8 ++++----
|
||||
2 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/Stack/BuildPlan.hs b/src/Stack/BuildPlan.hs
|
||||
index 36f82236e..c5c80efc6 100644
|
||||
--- a/src/Stack/BuildPlan.hs
|
||||
+++ b/src/Stack/BuildPlan.hs
|
||||
@@ -224,7 +224,7 @@ selectPackageBuildPlan platform compiler pool gpd =
|
||||
flagCombinations :: NonEmpty [(FlagName, Bool)]
|
||||
flagCombinations = mapM getOptions (genPackageFlags gpd)
|
||||
where
|
||||
- getOptions :: C.Flag -> NonEmpty (FlagName, Bool)
|
||||
+ getOptions :: C.PackageFlag -> NonEmpty (FlagName, Bool)
|
||||
getOptions f
|
||||
| flagManual f = (fname, flagDefault f) :| []
|
||||
| flagDefault f = (fname, True) :| [(fname, False)]
|
||||
diff --git a/src/Stack/Package.hs b/src/Stack/Package.hs
|
||||
index 4db50d2a4..d9bca7af5 100644
|
||||
--- a/src/Stack/Package.hs
|
||||
+++ b/src/Stack/Package.hs
|
||||
@@ -128,7 +128,7 @@ resolvePackage packageConfig gpkg =
|
||||
(resolvePackageDescription packageConfig gpkg)
|
||||
|
||||
packageFromPackageDescription :: PackageConfig
|
||||
- -> [D.Flag]
|
||||
+ -> [PackageFlag]
|
||||
-> PackageDescriptionPair
|
||||
-> Package
|
||||
packageFromPackageDescription packageConfig pkgFlags (PackageDescriptionPair pkgNoMod pkg) =
|
||||
@@ -935,9 +935,9 @@ resolvePackageDescription packageConfig (GenericPackageDescription desc defaultF
|
||||
-- | Make a map from a list of flag specifications.
|
||||
--
|
||||
-- What is @flagManual@ for?
|
||||
-flagMap :: [Flag] -> Map FlagName Bool
|
||||
+flagMap :: [PackageFlag] -> Map FlagName Bool
|
||||
flagMap = M.fromList . map pair
|
||||
- where pair :: Flag -> (FlagName, Bool)
|
||||
+ where pair :: PackageFlag -> (FlagName, Bool)
|
||||
pair = flagName &&& flagDefault
|
||||
|
||||
data ResolveConditions = ResolveConditions
|
||||
@@ -986,7 +986,7 @@ resolveConditions rc addDeps (CondNode lib deps cs) = basic <> children
|
||||
case v of
|
||||
OS os -> os == rcOS rc
|
||||
Arch arch -> arch == rcArch rc
|
||||
- Flag flag ->
|
||||
+ PackageFlag flag ->
|
||||
fromMaybe False $ M.lookup flag (rcFlags rc)
|
||||
-- NOTE: ^^^^^ This should never happen, as all flags
|
||||
-- which are used must be declared. Defaulting to
|
||||
|
||||
From 8facd731ec3f2bbc15a083750740929167b33bb2 Mon Sep 17 00:00:00 2001
|
||||
From: Brandon Chinn <brandon@leapyear.io>
|
||||
Date: Fri, 4 Jun 2021 16:55:30 -0700
|
||||
Subject: [PATCH 3/6] Fix CabalSpecVersion
|
||||
|
||||
---
|
||||
src/Stack/Package.hs | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/Stack/Package.hs b/src/Stack/Package.hs
|
||||
index d9bca7af5..fca039140 100644
|
||||
--- a/src/Stack/Package.hs
|
||||
+++ b/src/Stack/Package.hs
|
||||
@@ -32,6 +32,7 @@ import Data.List (find, isPrefixOf, unzip)
|
||||
import qualified Data.Map.Strict as M
|
||||
import qualified Data.Set as S
|
||||
import qualified Data.Text as T
|
||||
+import Distribution.CabalSpecVersion (CabalSpecVersion, cabalSpecMinimumLibraryVersion)
|
||||
import Distribution.Compiler
|
||||
import Distribution.ModuleName (ModuleName)
|
||||
import qualified Distribution.ModuleName as Cabal
|
||||
@@ -190,7 +191,7 @@ packageFromPackageDescription packageConfig pkgFlags (PackageDescriptionPair pkg
|
||||
(library pkg)
|
||||
, packageBuildType = buildType pkg
|
||||
, packageSetupDeps = msetupDeps
|
||||
- , packageCabalSpec = either orLaterVersion id $ specVersionRaw pkg
|
||||
+ , packageCabalSpec = orLaterVersion $ mkVersion $ cabalSpecMinimumLibraryVersion $ specVersion pkg
|
||||
}
|
||||
where
|
||||
extraLibNames = S.union subLibNames foreignLibNames
|
||||
@@ -696,7 +697,7 @@ packageDescModulesAndFiles pkg = do
|
||||
|
||||
-- | Resolve globbing of files (e.g. data files) to absolute paths.
|
||||
resolveGlobFiles
|
||||
- :: Version -- ^ cabal file version
|
||||
+ :: CabalSpecVersion -- ^ cabal file version
|
||||
-> [String]
|
||||
-> RIO Ctx (Set (Path Abs File))
|
||||
resolveGlobFiles cabalFileVersion =
|
||||
|
||||
From 004f14652409b7d0645215d354b2e599eb7f76bc Mon Sep 17 00:00:00 2001
|
||||
From: Brandon Chinn <brandon@leapyear.io>
|
||||
Date: Fri, 4 Jun 2021 16:55:40 -0700
|
||||
Subject: [PATCH 4/6] Fix GenericPackageDescription
|
||||
|
||||
---
|
||||
src/Stack/Build.hs | 2 +-
|
||||
src/Stack/Package.hs | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/Stack/Build.hs b/src/Stack/Build.hs
|
||||
index 23b9a9719..856903bed 100644
|
||||
--- a/src/Stack/Build.hs
|
||||
+++ b/src/Stack/Build.hs
|
||||
@@ -358,7 +358,7 @@ checkComponentsBuildable lps =
|
||||
checkSubLibraryDependencies :: HasLogFunc env => [ProjectPackage] -> RIO env ()
|
||||
checkSubLibraryDependencies proj = do
|
||||
forM_ proj $ \p -> do
|
||||
- C.GenericPackageDescription _ _ lib subLibs foreignLibs exes tests benches <- liftIO $ cpGPD . ppCommon $ p
|
||||
+ C.GenericPackageDescription _ _ _ lib subLibs foreignLibs exes tests benches <- liftIO $ cpGPD . ppCommon $ p
|
||||
|
||||
let dependencies = concatMap getDeps subLibs <>
|
||||
concatMap getDeps foreignLibs <>
|
||||
diff --git a/src/Stack/Package.hs b/src/Stack/Package.hs
|
||||
index fca039140..39aad4d2f 100644
|
||||
--- a/src/Stack/Package.hs
|
||||
+++ b/src/Stack/Package.hs
|
||||
@@ -863,7 +863,7 @@ data PackageDescriptionPair = PackageDescriptionPair
|
||||
resolvePackageDescription :: PackageConfig
|
||||
-> GenericPackageDescription
|
||||
-> PackageDescriptionPair
|
||||
-resolvePackageDescription packageConfig (GenericPackageDescription desc defaultFlags mlib subLibs foreignLibs' exes tests benches) =
|
||||
+resolvePackageDescription packageConfig (GenericPackageDescription desc _ defaultFlags mlib subLibs foreignLibs' exes tests benches) =
|
||||
PackageDescriptionPair
|
||||
{ pdpOrigBuildable = go False
|
||||
, pdpModifiedBuildable = go True
|
||||
|
||||
From 820797b566ef981936907f4d19658259d4a635a8 Mon Sep 17 00:00:00 2001
|
||||
From: Brandon Chinn <brandon@leapyear.io>
|
||||
Date: Fri, 4 Jun 2021 17:01:01 -0700
|
||||
Subject: [PATCH 5/6] Fix generatePackageVersionMacros
|
||||
|
||||
---
|
||||
src/Stack/Build/Execute.hs | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/Stack/Build/Execute.hs b/src/Stack/Build/Execute.hs
|
||||
index 1e381dd21..aedd7fee5 100644
|
||||
--- a/src/Stack/Build/Execute.hs
|
||||
+++ b/src/Stack/Build/Execute.hs
|
||||
@@ -1214,7 +1214,7 @@ withSingleContext ActionContext {..} ee@ExecuteEnv {..} task@Task {..} allDeps m
|
||||
let macroDeps = mapMaybe snd matchedDeps
|
||||
cppMacrosFile = setupDir </> relFileSetupMacrosH
|
||||
cppArgs = ["-optP-include", "-optP" ++ toFilePath cppMacrosFile]
|
||||
- writeBinaryFileAtomic cppMacrosFile (encodeUtf8Builder (T.pack (C.generatePackageVersionMacros macroDeps)))
|
||||
+ writeBinaryFileAtomic cppMacrosFile (encodeUtf8Builder (T.pack (C.generatePackageVersionMacros (packageVersion package) macroDeps)))
|
||||
return (packageDBArgs ++ depsArgs ++ cppArgs)
|
||||
|
||||
-- This branch is usually taken for builds, and
|
||||
|
||||
From 336ab515e30f03c274f89ebe1cbc6aa1e597c2a4 Mon Sep 17 00:00:00 2001
|
||||
From: Brandon Chinn <brandon@leapyear.io>
|
||||
Date: Fri, 4 Jun 2021 17:04:16 -0700
|
||||
Subject: [PATCH 6/6] Fix ModuleReexport
|
||||
|
||||
---
|
||||
src/Stack/Script.hs | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/Stack/Script.hs b/src/Stack/Script.hs
|
||||
index 6bb67c049..9ebd2173d 100644
|
||||
--- a/src/Stack/Script.hs
|
||||
+++ b/src/Stack/Script.hs
|
||||
@@ -18,6 +18,7 @@ import Distribution.Compiler (CompilerFlavor (..))
|
||||
import Distribution.ModuleName (ModuleName)
|
||||
import qualified Distribution.PackageDescription as PD
|
||||
import qualified Distribution.Types.CondTree as C
|
||||
+import qualified Distribution.Types.ModuleReexport as ModuleReexport
|
||||
import Distribution.Types.PackageName (mkPackageName)
|
||||
import Distribution.Types.VersionRange (withinRange)
|
||||
import Distribution.System (Platform (..))
|
||||
@@ -280,7 +281,7 @@ allExposedModules gpd = do
|
||||
mlibrary = snd . C.simplifyCondTree checkCond <$> PD.condLibrary gpd
|
||||
pure $ case mlibrary of
|
||||
Just lib -> PD.exposedModules lib ++
|
||||
- map PD.moduleReexportName (PD.reexportedModules lib)
|
||||
+ map ModuleReexport.moduleReexportName (PD.reexportedModules lib)
|
||||
Nothing -> mempty
|
||||
|
||||
-- | The Stackage project introduced the concept of hidden packages,
|
|
@ -1,26 +0,0 @@
|
|||
Adapted from: https://github.com/commercialhaskell/stack/commit/4afcf774d2a821e69b6a1afca67bf34341c84e85
|
||||
|
||||
--- a/src/Options/Applicative/Complicated.hs
|
||||
+++ b/src/Options/Applicative/Complicated.hs
|
||||
@@ -136,20 +136,9 @@ complicatedParser commandMetavar commonP
|
||||
(,) <$>
|
||||
commonParser <*>
|
||||
case runWriter (runExceptT commandParser) of
|
||||
- (Right (),d) -> hsubparser' commandMetavar d
|
||||
+ (Right (), m) -> hsubparser (m <> metavar commandMetavar)
|
||||
(Left b,_) -> pure (b,mempty)
|
||||
|
||||
--- | Subparser with @--help@ argument. Borrowed with slight modification
|
||||
--- from Options.Applicative.Extra.
|
||||
-hsubparser' :: String -> Mod CommandFields a -> Parser a
|
||||
-hsubparser' commandMetavar m = mkParser d g rdr
|
||||
- where
|
||||
- Mod _ d g = metavar commandMetavar `mappend` m
|
||||
- (groupName, cmds, subs) = mkCommand m
|
||||
- rdr = CmdReader groupName cmds (fmap add_helper . subs)
|
||||
- add_helper pinfo = pinfo
|
||||
- { infoParser = infoParser pinfo <**> helpOption }
|
||||
-
|
||||
-- | Non-hidden help option.
|
||||
helpOption :: Parser (a -> a)
|
||||
helpOption =
|
|
@ -1,40 +0,0 @@
|
|||
constrain http-download to prevent build failures
|
||||
|
||||
--- a/stack.cabal
|
||||
+++ b/stack.cabal
|
||||
@@ -267,7 +267,7 @@ library
|
||||
http-client >=0.6.4.1,
|
||||
http-client-tls >=0.3.5.3,
|
||||
http-conduit >=2.3.8,
|
||||
- http-download >=0.2.0.0,
|
||||
+ http-download >=0.2.0.0 && <0.2.1,
|
||||
http-types >=0.12.3,
|
||||
memory >=0.15.0,
|
||||
microlens >=0.4.11.2,
|
||||
@@ -393,7 +393,7 @@ executable stack
|
||||
http-client >=0.6.4.1,
|
||||
http-client-tls >=0.3.5.3,
|
||||
http-conduit >=2.3.8,
|
||||
- http-download >=0.2.0.0,
|
||||
+ http-download >=0.2.0.0 && <0.2.1,
|
||||
http-types >=0.12.3,
|
||||
memory >=0.15.0,
|
||||
microlens >=0.4.11.2,
|
||||
@@ -522,7 +522,7 @@ executable stack-integration-test
|
||||
http-client >=0.6.4.1,
|
||||
http-client-tls >=0.3.5.3,
|
||||
http-conduit >=2.3.8,
|
||||
- http-download >=0.2.0.0,
|
||||
+ http-download >=0.2.0.0 && <0.2.1,
|
||||
http-types >=0.12.3,
|
||||
memory >=0.15.0,
|
||||
microlens >=0.4.11.2,
|
||||
@@ -658,7 +658,7 @@ test-suite stack-test
|
||||
http-client >=0.6.4.1,
|
||||
http-client-tls >=0.3.5.3,
|
||||
http-conduit >=2.3.8,
|
||||
- http-download >=0.2.0.0,
|
||||
+ http-download >=0.2.0.0 && <0.2.1,
|
||||
http-types >=0.12.3,
|
||||
memory >=0.15.0,
|
||||
microlens >=0.4.11.2,
|
|
@ -1,40 +0,0 @@
|
|||
constrain pantry to prevent build failures
|
||||
|
||||
--- a/stack.cabal
|
||||
+++ b/stack.cabal
|
||||
@@ -279,7 +279,7 @@ library
|
||||
network-uri >=2.6.4.1,
|
||||
open-browser >=0.2.1.0,
|
||||
optparse-applicative >=0.14.3.0,
|
||||
- pantry >=0.5.3,
|
||||
+ pantry >=0.5.3 && <0.6.0,
|
||||
path >=0.7.0,
|
||||
path-io >=1.6.3,
|
||||
persistent >=2.11.0.4 && <2.14.0.0,
|
||||
@@ -405,7 +405,7 @@ executable stack
|
||||
network-uri >=2.6.4.1,
|
||||
open-browser >=0.2.1.0,
|
||||
optparse-applicative >=0.14.3.0,
|
||||
- pantry >=0.5.3,
|
||||
+ pantry >=0.5.3 && <0.6.0,
|
||||
path >=0.7.0,
|
||||
path-io >=1.6.3,
|
||||
persistent >=2.11.0.4 && <2.14.0.0,
|
||||
@@ -535,7 +535,7 @@ executable stack-integration-test
|
||||
open-browser >=0.2.1.0,
|
||||
optparse-applicative >=0.14.3.0,
|
||||
optparse-generic >=1.3.1,
|
||||
- pantry >=0.5.3,
|
||||
+ pantry >=0.5.3 && <0.6.0,
|
||||
path >=0.7.0,
|
||||
path-io >=1.6.3,
|
||||
persistent >=2.11.0.4 && <2.14.0.0,
|
||||
@@ -670,7 +670,7 @@ test-suite stack-test
|
||||
network-uri >=2.6.4.1,
|
||||
open-browser >=0.2.1.0,
|
||||
optparse-applicative >=0.14.3.0,
|
||||
- pantry >=0.5.3,
|
||||
+ pantry >=0.5.3 && <0.6.0,
|
||||
path >=0.7.0,
|
||||
path-io >=1.6.3,
|
||||
persistent >=2.11.0.4 && <2.14.0.0,
|
|
@ -1,46 +0,0 @@
|
|||
commit 188d7ece06ee06ed6ccaf0df0c46285bd43898f4
|
||||
Author: q66 <daniel@octaforge.org>
|
||||
Date: Thu Apr 28 05:02:09 2022 +0200
|
||||
|
||||
constrain persistent to fix build
|
||||
|
||||
diff --git a/stack.cabal b/stack.cabal
|
||||
index dba5bf0..e221321 100644
|
||||
--- a/stack.cabal
|
||||
+++ b/stack.cabal
|
||||
@@ -281,7 +281,7 @@ library
|
||||
pantry >=0.5.3,
|
||||
path >=0.7.0,
|
||||
path-io >=1.6.3,
|
||||
- persistent >=2.11.0.4,
|
||||
+ persistent >=2.11.0.4 && <2.14.0.0,
|
||||
persistent-sqlite >=2.11.1.0,
|
||||
persistent-template >=2.9.1.0,
|
||||
pretty >=1.1.3.6,
|
||||
@@ -407,7 +407,7 @@ executable stack
|
||||
pantry >=0.5.3,
|
||||
path >=0.7.0,
|
||||
path-io >=1.6.3,
|
||||
- persistent >=2.11.0.4,
|
||||
+ persistent >=2.11.0.4 && <2.14.0.0,
|
||||
persistent-sqlite >=2.11.1.0,
|
||||
persistent-template >=2.9.1.0,
|
||||
pretty >=1.1.3.6,
|
||||
@@ -537,7 +537,7 @@ executable stack-integration-test
|
||||
pantry >=0.5.3,
|
||||
path >=0.7.0,
|
||||
path-io >=1.6.3,
|
||||
- persistent >=2.11.0.4,
|
||||
+ persistent >=2.11.0.4 && <2.14.0.0,
|
||||
persistent-sqlite >=2.11.1.0,
|
||||
persistent-template >=2.9.1.0,
|
||||
pretty >=1.1.3.6,
|
||||
@@ -672,7 +672,7 @@ test-suite stack-test
|
||||
pantry >=0.5.3,
|
||||
path >=0.7.0,
|
||||
path-io >=1.6.3,
|
||||
- persistent >=2.11.0.4,
|
||||
+ persistent >=2.11.0.4 && <2.14.0.0,
|
||||
persistent-sqlite >=2.11.1.0,
|
||||
persistent-template >=2.9.1.0,
|
||||
pretty >=1.1.3.6,
|
|
@ -1,32 +0,0 @@
|
|||
--- a/src/Stack/Setup.hs
|
||||
+++ b/src/Stack/Setup.hs
|
||||
@@ -91,6 +91,7 @@
|
||||
import System.FilePath (searchPathSeparator)
|
||||
import qualified System.FilePath as FP
|
||||
import System.Permissions (setFileExecutable)
|
||||
+import System.Endian (getSystemEndianness, Endianness (..))
|
||||
import System.Uname (getRelease)
|
||||
import Data.List.Split (splitOn)
|
||||
|
||||
@@ -1241,6 +1242,11 @@
|
||||
Platform X86_64 Cabal.Windows -> return "windows64"
|
||||
Platform Arm Cabal.Linux -> return "linux-armv7"
|
||||
Platform AArch64 Cabal.Linux -> return "linux-aarch64"
|
||||
+ Platform PPC Cabal.Linux -> return "linux-powerpc"
|
||||
+ Platform PPC64 Cabal.Linux ->
|
||||
+ case getSystemEndianness of
|
||||
+ LittleEndian -> return "linux-powerpc64le"
|
||||
+ BigEndian -> return "linux-powerpc64"
|
||||
Platform Sparc Cabal.Linux -> return "linux-sparc"
|
||||
Platform arch os -> throwM $ UnsupportedSetupCombo os arch
|
||||
|
||||
--- a/stack.cabal
|
||||
+++ b/stack.cabal
|
||||
@@ -246,6 +246,7 @@
|
||||
conduit >=1.3.4.1,
|
||||
conduit-extra >=1.3.5,
|
||||
containers >=0.6.2.1,
|
||||
+ cpu >=0.1.2,
|
||||
cryptonite >=0.27,
|
||||
cryptonite-conduit >=0.2.2,
|
||||
deepseq >=1.4.4.0,
|
8
srcpkgs/stack/patches/project.patch
Normal file
8
srcpkgs/stack/patches/project.patch
Normal file
|
@ -0,0 +1,8 @@
|
|||
--- a/cabal.project 2025-07-05 18:24:05.053213076 +0100
|
||||
+++ b/cabal.project 2025-07-05 18:12:23.016337449 +0100
|
||||
@@ -37,4 +37,4 @@
|
||||
--
|
||||
with-compiler: ghc-9.8.4
|
||||
import: cabal.config
|
||||
-packages: .
|
||||
+packages: ./basement ./memory ./cborg .
|
|
@ -1,40 +0,0 @@
|
|||
constrain unix-compat version to prevent build failures
|
||||
|
||||
--- a/stack.cabal
|
||||
+++ b/stack.cabal
|
||||
@@ -307,7 +308,7 @@ library
|
||||
transformers >=0.5.6.2,
|
||||
typed-process >=0.2.6.0,
|
||||
unicode-transforms >=0.3.7.1,
|
||||
- unix-compat >=0.5.3,
|
||||
+ unix-compat >=0.5.3 && < 0.7,
|
||||
unliftio >=0.2.18,
|
||||
unordered-containers >=0.2.14.0,
|
||||
vector >=0.12.1.2,
|
||||
@@ -434,7 +435,7 @@ executable stack
|
||||
transformers >=0.5.6.2,
|
||||
typed-process >=0.2.6.0,
|
||||
unicode-transforms >=0.3.7.1,
|
||||
- unix-compat >=0.5.3,
|
||||
+ unix-compat >=0.5.3 && < 0.7,
|
||||
unliftio >=0.2.18,
|
||||
unordered-containers >=0.2.14.0,
|
||||
vector >=0.12.1.2,
|
||||
@@ -563,7 +564,7 @@ executable stack-integration-test
|
||||
transformers >=0.5.6.2,
|
||||
typed-process >=0.2.6.0,
|
||||
unicode-transforms >=0.3.7.1,
|
||||
- unix-compat >=0.5.3,
|
||||
+ unix-compat >=0.5.3 && < 0.7,
|
||||
unliftio >=0.2.18,
|
||||
unordered-containers >=0.2.14.0,
|
||||
vector >=0.12.1.2,
|
||||
@@ -701,7 +702,7 @@ test-suite stack-test
|
||||
transformers >=0.5.6.2,
|
||||
typed-process >=0.2.6.0,
|
||||
unicode-transforms >=0.3.7.1,
|
||||
- unix-compat >=0.5.3,
|
||||
+ unix-compat >=0.5.3 && < 0.7,
|
||||
unliftio >=0.2.18,
|
||||
unordered-containers >=0.2.14.0,
|
||||
vector >=0.12.1.2,
|
|
@ -1,31 +1,38 @@
|
|||
# Template file for 'stack'
|
||||
pkgname=stack
|
||||
version=2.7.5
|
||||
revision=2
|
||||
_stackage="lts-19.0"
|
||||
hostmakedepends="cabal-install pkg-config unzip"
|
||||
makedepends="zlib-devel pcre-devel"
|
||||
version=3.7.1
|
||||
revision=1
|
||||
build_style=cabal
|
||||
cabal_index_state="2025-06-29T20:30:08Z"
|
||||
make_build_args="-f disable-git-info"
|
||||
makedepends="zlib-devel"
|
||||
depends="git gmp-devel iana-etc"
|
||||
short_desc="Cross-platform program for developing Haskell projects"
|
||||
maintainer="Leah Neukirchen <leah@vuxu.org>"
|
||||
license="BSD-3-Clause"
|
||||
homepage="https://haskellstack.org"
|
||||
# cborg will likely be fixed in the next release and can then be removed here.
|
||||
# https://github.com/well-typed/cborg/pull/322
|
||||
# The other two are unmaintained and archived, the only way they get fixed
|
||||
# is if the dependency is removed from stack.
|
||||
distfiles="https://hackage.haskell.org/package/${pkgname}-${version}/${pkgname}-${version}.tar.gz
|
||||
https://www.stackage.org/${_stackage}/cabal.config>cabal.config-${_stackage}"
|
||||
checksum="9ddd44c2a62e9404194d69e7dc1c94e707910620316b66d6ac0b3201a8f37e80
|
||||
2e836f769693cde2592963f200c97a3e8a87eb58777fa4289d7c3c671f971186"
|
||||
skip_extraction="cabal.config-${_stackage}"
|
||||
https://hackage.haskell.org/package/basement-0.0.16/basement-0.0.16.tar.gz
|
||||
https://hackage.haskell.org/package/memory-0.18.0/memory-0.18.0.tar.gz
|
||||
https://hackage.haskell.org/package/cborg-0.2.10.0/cborg-0.2.10.0.tar.gz"
|
||||
checksum="412a7a8d654ba38b29ea88f473c771d612c1836af80c0293fe092faa430ac80e
|
||||
7fb77e249aef76ba5aed3059d556800ce02b614597c488ba01f0a16449146300
|
||||
fd4eb6f638e24b81b4e6cdd68772a531726f2f67686c8969d3407d82f7862e3e
|
||||
17fe070c38fc498cab49bcb9d6215b7747d53bedf96502e9bcce9cad73b9c797"
|
||||
nocross=yes
|
||||
nopie_files="/usr/bin/stack"
|
||||
skip_extraction="basement-0.0.16.tar.gz memory-0.18.0.tar.gz cborg-0.2.10.0.tar.gz"
|
||||
|
||||
do_build() {
|
||||
cp ${XBPS_SRCDISTDIR}/${pkgname}-${version}/cabal.config-${_stackage} cabal.config
|
||||
HOME=$PWD cabal update
|
||||
HOME=$PWD cabal new-build ${makejobs} --flag disable-git-info \
|
||||
--constraint 'lukko -ofd-locking' # https://github.com/haskell/cabal/issues/7313
|
||||
post_extract() {
|
||||
vsrcextract -C basement basement-0.0.16.tar.gz
|
||||
vsrcextract -C memory memory-0.18.0.tar.gz
|
||||
vsrcextract -C cborg cborg-0.2.10.0.tar.gz
|
||||
}
|
||||
|
||||
do_install() {
|
||||
eval vbin dist-newstyle/build/*/*/*/build/stack/stack
|
||||
post_install() {
|
||||
vlicense LICENSE
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue