From 55c57755a72976fa1990dc52df794630f553aa5f Mon Sep 17 00:00:00 2001 From: Bodigrim Date: Sat, 10 Jan 2026 20:35:38 +0000 Subject: [PATCH 1/4] Data.ByteString.Short: import members of class Eq and class Ord explicitly This is in case someone in future actually implements "The Eq of no (/=)" proposal (https://github.com/haskell/core-libraries-committee/issues/3), which will make `Eq(..)` not to import `(/=)`. I'm not aware of any proposals to change the composition of `Ord(..)` at the moment, but it feels more consistent to make it explicit too. --- Data/ByteString/Short/Internal.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Data/ByteString/Short/Internal.hs b/Data/ByteString/Short/Internal.hs index 6b67e88b..7fe8b267 100644 --- a/Data/ByteString/Short/Internal.hs +++ b/Data/ByteString/Short/Internal.hs @@ -229,7 +229,9 @@ import GHC.Stack.Types ( HasCallStack ) import GHC.Word import Prelude - ( Eq(..), Ord(..), Ordering(..), Read(..), Show(..) + ( Eq, (==), (/=) + , Ord, compare, (<), (<=), (>), (>=), min, max + , Ordering(..), Read(..), Show(..) , ($), ($!), error, (++), (.), (||) , String, userError , Bool(..), (&&), otherwise From e36b5c1c75a96c2307d7e1f5805206538fc5149c Mon Sep 17 00:00:00 2001 From: Bodigrim Date: Fri, 3 Apr 2026 22:24:23 +0100 Subject: [PATCH 2/4] Fix FreeBSD CI --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 8961f55f..35005543 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,7 +1,7 @@ task: name: FreeBSD freebsd_instance: - image_family: freebsd-14-2 + image_family: freebsd-14-3 install_script: - pkg install -y git gmake - curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_INSTALL_NO_STACK=1 sh From edeb0ab1dcdb3797162eb8f0033258f77eb71773 Mon Sep 17 00:00:00 2001 From: Bodigrim Date: Fri, 3 Apr 2026 22:42:45 +0100 Subject: [PATCH 3/4] Fix OpenBSD CI --- .cirrus.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 35005543..ecd65a06 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -18,7 +18,8 @@ task: platform: openbsd install_script: pkg_add ghc cabal-install git script: - - export CABAL_DIR=/tmp/.cabal + - mkdir -p /home/cabal + - ln -s /home/cabal $HOME/.cabal - cabal update - cabal test --test-show-details=direct From 279d65cbd231c0b8524f5018a29d16e57315465b Mon Sep 17 00:00:00 2001 From: Bodigrim Date: Fri, 3 Apr 2026 22:31:28 +0100 Subject: [PATCH 4/4] Tests: work around LazyHClose, these tests are not runnable concurrently --- tests/LazyHClose.hs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/LazyHClose.hs b/tests/LazyHClose.hs index 6f135f39..76ae6cbd 100644 --- a/tests/LazyHClose.hs +++ b/tests/LazyHClose.hs @@ -1,3 +1,6 @@ +{-# LANGUAGE CPP #-} +{- HLINT ignore "Use fewer imports" -} + module LazyHClose (testSuite) where import Control.Monad (void, forM_) @@ -6,7 +9,7 @@ import Foreign.C.String (withCString) import Foreign.ForeignPtr (finalizeForeignPtr) import System.IO (openFile, openTempFile, hClose, hPutStrLn, IOMode(..)) import System.Posix.Internals (c_unlink) -import Test.Tasty (TestTree, testGroup, withResource) +import Test.Tasty (TestTree, withResource) import Test.Tasty.QuickCheck (testProperty, ioProperty) import qualified Data.ByteString as S @@ -14,6 +17,15 @@ import qualified Data.ByteString.Char8 as S8 import qualified Data.ByteString.Lazy as L import qualified Data.ByteString.Lazy.Char8 as L8 +#if MIN_VERSION_tasty(1,5,4) +import Test.Tasty (inOrderTestGroup) +#else +import Test.Tasty (testGroup) + +inOrderTestGroup :: String -> [TestTree] -> TestTree +inOrderTestGroup = testGroup +#endif + n :: Int n = 1000 @@ -21,7 +33,7 @@ testSuite :: TestTree testSuite = withResource (do (fn, h) <- openTempFile "." "lazy-hclose-test.tmp"; hPutStrLn h "x"; hClose h; pure fn) removeFile $ \fn' -> - testGroup "LazyHClose" + inOrderTestGroup "LazyHClose" [ testProperty "Testing resource leaks for Strict.readFile" $ ioProperty $ forM_ [1..n] $ const $ do fn <- fn'