Skip to content

Commit

Permalink
Add sequenceInbound
Browse files Browse the repository at this point in the history
  • Loading branch information
locallycompact committed Apr 16, 2024
1 parent fec096e commit 83698d8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions hydra-node/src/Hydra/Network.hs
Expand Up @@ -26,6 +26,7 @@ module Hydra.Network (
mapInboundM,
contramapOutbound,
contramapOutboundM,
sequenceInbound,
close,
) where

Expand Down Expand Up @@ -91,6 +92,13 @@ contramapOutboundM ::
NetworkComponent m inbound outbound' a
contramapOutboundM f withBaseNetwork callback action = withBaseNetwork callback (action . contramapNetworkM f)

sequenceInbound ::
Traversable t =>
Applicative f =>
NetworkComponent m (t (f inbound)) outbound a ->
NetworkComponent m (f (t inbound)) outbound a
sequenceInbound withBaseNetwork callback = withBaseNetwork (callback . sequenceA)

-- * Types used by concrete implementations

-- ** PortNumber (Orphans)
Expand Down

0 comments on commit 83698d8

Please sign in to comment.