Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion acts-generic/src/Data/Act/Generic.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
Expand Down Expand Up @@ -68,7 +69,13 @@ instance (GAct s f, GAct s g) => GAct s (f :+: g) where
--
newtype GenericAct s a = GenericAct { getGenericAct :: a }

instance (Generic s, Generic a, GAct s (Rep a), Semigroup s) => Act s (GenericAct s a) where
instance (
#if __GLASGOW_HASKELL__ < 914
-- These constraints are REQUIRED for ghc < 9.14 but REDUNDANT for ghc >= 9.14
-- See https://gitlab.haskell.org/ghc/ghc/-/issues/26381#note_637863
Generic s,
#endif
Generic a, GAct s (Rep a), Semigroup s) => Act s (GenericAct s a) where
act s (GenericAct a) = GenericAct (s `gact` a)


Expand Down
149 changes: 147 additions & 2 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ repository cardano-haskell-packages
-- repeat the index-state for hackage to work around haskell.nix parsing limitation
index-state:
-- Bump this if you need newer packages from Hackage
, hackage.haskell.org 2025-11-10T01:36:00Z
, hackage.haskell.org 2025-11-19T05:14:49Z

-- Bump this if you need newer packages from CHaP
, cardano-haskell-packages 2025-11-07T15:42:47Z
, cardano-haskell-packages 2025-11-18T18:44:49Z

packages: ./cardano-ping
./monoidal-synchronisation
Expand Down Expand Up @@ -62,3 +62,148 @@ source-repository-package
tag: 6d0f51fba415d3c641a8a8da37130e7adfc3ea01
--sha256: sha256-qM8RgmKOGBMlizPtXw2YOboYIzM6T3kvG9/Rp1F+bYQ=
subdir: kes-agent-crypto

if impl (ghc >= 9.14)
constraints:
, containers > 0.7
, foldl >= 1.4.18
-- Newest version causes Arbitrary instance clashes in quickcheck-instances.
, QuickCheck < 2.17.0.0

-- cabal-allow-newer
if impl (ghc >= 9.14)
allow-newer:
, OneTuple:base
, aeson:QuickCheck
, aeson:base
, aeson:bytestring
, aeson:containers
, aeson:deepseq
, aeson:ghc-prim
, aeson:template-haskell
, aeson:text-iso8601
, aeson:text-short
, aeson:time
, aeson:time-compat
, aeson:witherable
, assoc:base
, async:base
, base:ghc-prim
, bifunctors:template-haskell
, bifunctors:th-abstraction
, binary:containers
, binary-orphans:base
, boring:base
, canonical-json:containers
, cardano-diffusion:cborg
, cardano-diffusion:io-classes
, cardano-diffusion:typed-protocols
, cardano-ping:time
, cardano-prelude:canonical-json
, cborg:base
, cborg:bytestring
, cborg:containers
, criterion:microstache
, data-fix:base
, directory:time
, dmq-node:time
, exceptions:mtl
, filepath:base
, free:base
, free:exceptions
, free:mtl
, free:template-haskell
, generic-data:base
, generically:base
, ghc-heap:containers
, hashable:base
, hashable:containers
, hashable:ghc-bignum
, hsc2hs:base
, indexed-traversable:base
, indexed-traversable:containers
, indexed-traversable-instances:base
, integer-conversion:base
, integer-logarithms:base
, integer-logarithms:ghc-bignum
, io-classes:async
, io-classes:base
, io-classes:time
, io-sim:base
, io-sim:time
, kes-agent-crypto:base
, microstache:aeson
, microstache:base
, microstache:containers
, network-mux:containers
, network-mux:time
, network-uri:th-compat
, nothunks:base
, nothunks:bytestring
, nothunks:time
, ntp-client:time
, os-string:bytestring
, os-string:exceptions
, os-string:template-haskell
, ouroboros-network:time
, parallel:base
, parsec:bytestring
, primitive:base
, process:base
, quickcheck-instances:base
, quickcheck-instances:bytestring
, quickcheck-instances:containers
, recursion-schemes:containers
, recursion-schemes:data-fix
, recursion-schemes:free
, recursion-schemes:template-haskell
, scientific:base
, scientific:containers
, scientific:integer-logarithms
, scientific:template-haskell
, semialign:base
, semialign:containers
, semigroupoids:bifunctors
, serialise:base
, serialise:bytestring
, serialise:containers
, serialise:ghc-prim
, serialise:hashable
, serialise:these
, serialise:time
, singletons:base
, splitmix:base
, statistics:parallel
, tagged:template-haskell
, tdigest:base
, text:binary
, text-iso8601:time
, text-short:base
, text-short:ghc-prim
, text-short:template-haskell
, th-abstraction:template-haskell
, th-compat:template-haskell
, these:base
, time-compat:base
, time-compat:hashable
, time-compat:time
, tree-diff:aeson
, tree-diff:base
, tree-diff:containers
, tree-diff:deepseq
, tree-diff:scientific
, tree-diff:tagged
, tree-diff:time
, tree-diff:uuid-types
, typed-protocols:base
, typed-protocols:singletons
, unix:base
, unordered-containers:base
, unordered-containers:hashable
, unordered-containers:template-haskell
, uuid-types:template-haskell
, vector-th-unbox:base
, vector-th-unbox:template-haskell
, wherefrom-compat:base
, with-utf8:base
, witherable:containers
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,11 @@ prop_governor_peershare_1hr env@GovernorMockEnvironment {
)
in counterexample ( intercalate "\n"
. map (ppSimEvent 20 20 20)
. takeWhile (\e -> seTime e <= Time (60*60))
. takeWhile (\e ->
case e of
SimEvent {seTime} -> seTime < Time (60*60)
SimPOREvent {seTime} -> seTime < Time (60*60)
_ -> False)
. Trace.toList
$ ioSimTrace) $
subsetProperty found reachable
Expand Down
2 changes: 1 addition & 1 deletion cardano-ping/cardano-ping.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ library
network-mux ^>=0.9,
tdigest ^>=0.3,
text >=1.2.4 && <2.2,
time >=1.9.1 && <1.16,
time >=1.9.1 && <1.14,
transformers >=0.5 && <0.7,

if flag(asserts)
Expand Down
2 changes: 1 addition & 1 deletion dmq-node/dmq-node.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ library
random ^>=1.2,
singletons,
text >=1.2.4 && <2.2,
time >=1.12 && <1.16,
time ^>=1.12,
typed-protocols:{typed-protocols, cborg} ^>=1.1,

hs-source-dirs: src
Expand Down
5 changes: 5 additions & 0 deletions network-mux/src/Network/Mux.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleContexts #-}
Expand Down Expand Up @@ -66,7 +67,11 @@ import Data.Map (Map)
import Data.Map.Strict qualified as Map
import Data.Maybe (isNothing)
import Data.Monoid.Synchronisation (FirstToFinish (..))
#if __GLASGOW_HASKELL__ < 914
import Data.Strict.Tuple (pattern (:!:))
#else
import Data.Strict.Tuple (data (:!:))
#endif

import Control.Applicative
import Control.Concurrent.Class.MonadSTM.Strict
Expand Down
5 changes: 5 additions & 0 deletions network-mux/src/Network/Mux/Ingress.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NamedFieldPuns #-}
Expand All @@ -17,7 +18,11 @@ import Data.ByteString.Builder.Internal (lazyByteStringInsert,
lazyByteStringThreshold)
import Data.ByteString.Lazy qualified as BL
import Data.List (nub)
#if __GLASGOW_HASKELL__ < 914
import Data.Strict.Tuple (pattern (:!:))
#else
import Data.Strict.Tuple (data (:!:))
#endif

import Control.Concurrent.Class.MonadSTM.Strict
import Control.Monad
Expand Down
4 changes: 2 additions & 2 deletions ntp-client/ntp-client.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ library
contra-tracer >=0.1 && <0.2,
network ^>=3.2.7,
stm >=2.4 && <2.6,
time >=1.9.1 && <1.16,
time >=1.9.1 && <1.14,

hs-source-dirs: src
default-language: Haskell2010
Expand Down Expand Up @@ -67,7 +67,7 @@ test-suite test
binary >=0.8 && <0.11,
tasty,
tasty-quickcheck,
time >=1.9.1 && <1.16,
time >=1.9.1 && <1.14,

default-language: Haskell2010
default-extensions: ImportQualifiedPost
Expand Down
6 changes: 6 additions & 0 deletions ouroboros-network/api/lib/Ouroboros/Network/Block.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveTraversable #-}
Expand Down Expand Up @@ -40,8 +41,13 @@ module Ouroboros.Network.Block
, pointHash
, castPoint
, blockPoint
#if __GLASGOW_HASKELL__ < 914
, pattern GenesisPoint
, pattern BlockPoint
#else
, data GenesisPoint
, data BlockPoint
#endif
, atSlot
, withHash
, Tip (..)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
Expand All @@ -15,7 +16,13 @@ import Test.QuickCheck
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.QuickCheck (testProperty)

import Ouroboros.Network.Block (blockPrevHash, pattern GenesisPoint, pointHash)
import Ouroboros.Network.Block (blockPrevHash,
#if __GLASGOW_HASKELL__ < 914
pattern GenesisPoint,
#else
data GenesisPoint,
#endif
pointHash)
import Ouroboros.Network.Mock.Chain (Chain (..))
import Ouroboros.Network.Mock.Chain qualified as Chain
import Ouroboros.Network.Mock.ChainGenerators hiding (tests)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,15 @@ data AddressFamily addr where
--
TestFamily :: AddressFamily (TestAddress addr)

#if __GLASGOW_HASKELL__ < 914
-- These constraints are REQUIRED for ghc < 9.14 but REDUNDANT for ghc >= 9.14
-- See https://gitlab.haskell.org/ghc/ghc/-/issues/26381#note_637863
deriving instance Eq addr => Eq (AddressFamily addr)
deriving instance Show addr => Show (AddressFamily addr)

#else
deriving instance Eq (AddressFamily addr)
deriving instance Show (AddressFamily addr)
#endif

-- | Abstract communication interface that can be used by more than
-- 'Socket'. Snockets are polymorphic over monad which is used, this feature
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,10 +504,14 @@ mkSnocket scheduleMap = do
, show (remoteAddr, seIdx se)
]))
return se
case seConnDelay se of
Left d -> threadDelay d
>> throwIO (ioe (show (remoteAddr, seIdx se)))
Right d -> threadDelay d
case se of
ScheduleOutbound {} ->
case seConnDelay se of
Left d -> threadDelay d
>> throwIO (ioe (show (remoteAddr, seIdx se)))
Right d -> threadDelay d
ScheduleInbound {} ->
pure ()
where
ioe :: String -> IOException
ioe ioe_description =
Expand Down
Loading
Loading