-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- [x] Move `GenesisParameters` to primitive lib - [x] Move `NetworkParameters` to primitive lib - [x] Move `Byron` compatibility modules to primitive lib, rename to` Primitive.Ledger.Byron` - [x] Move `Shelley` compatibility module to primitive lib , rename to` Primitive.Ledger.Shelley` - [x] Split `CompatibilitySpec` (because it's containing stuff that has nothing to do with `Compatibility` module, ehm) - [x] Move the `CompatibilitySpec` part that pertains to Compatibility to primitive lib - [x] Split `UnliftIO.Compat` and move `coerceHandlers` to network-layer lib - [x] Move `Ouroboros.Network.Client.Wallet` to network-layer lib , rename to `Network.Implementation.Ouroboros` - [x] Move network implementation to network-layer lib and rename as `Network.Implementation` ADP-3229
- Loading branch information
Showing
28 changed files
with
998 additions
and
743 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
lib/network-layer/src/Cardano/Wallet/Network/Implementation/UnliftIO.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module Cardano.Wallet.Network.Implementation.UnliftIO | ||
( coerceHandler | ||
, coerceHandlers | ||
) | ||
where | ||
|
||
import qualified Control.Monad.Catch as Exceptions | ||
import qualified UnliftIO | ||
|
||
-- | Convert the generalized handler from 'UnliftIO.Exception' type to 'Control.Monad.Catch' type | ||
coerceHandler :: UnliftIO.Handler IO b -> Exceptions.Handler IO b | ||
coerceHandler (UnliftIO.Handler h) = Exceptions.Handler h | ||
|
||
-- | Convert a list of handler factories from the 'UnliftIO.Exception' type to | ||
-- 'Control.Monad.Catch' type. Such handlers are used in | ||
-- 'Control.Retry.Recovering' for example. | ||
coerceHandlers | ||
:: [a -> UnliftIO.Handler IO b] | ||
-> [a -> Exceptions.Handler IO b] | ||
coerceHandlers = map (coerceHandler .) |
Oops, something went wrong.