Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

Commit 730578d

Browse files
committed
NodeIPC example removed from Win32 compilation
Signed-off-by: Alexander Diemand <[email protected]>
1 parent 6b55af6 commit 730578d

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

cardano-shell.cabal

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,12 @@ library
3636
, Cardano.Shell.Presets
3737
, Cardano.Shell.Features.Logging
3838
other-modules:
39-
Cardano.Shell.NodeIPC.Example
40-
, Cardano.Shell.NodeIPC.Lib
39+
Cardano.Shell.NodeIPC.Lib
4140
, Cardano.Shell.NodeIPC.Message
41+
if !os(windows)
42+
other-modules:
43+
Cardano.Shell.NodeIPC.Example
44+
4245
hs-source-dirs:
4346
app
4447
, src
@@ -180,7 +183,10 @@ test-suite cardano-shell-test
180183
other-modules:
181184
Paths_cardano_shell
182185
DhallConfigSpec
186+
if !os(windows)
187+
other-modules:
183188
NodeIPCSpec
189+
184190
hs-source-dirs:
185191
test
186192
ghc-options: -threaded -rtsopts -with-rtsopts=-N

src/Cardano/Shell/NodeIPC.hs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
<https://github.com/input-output-hk/cardano-shell/blob/develop/specs/CardanoShellSpec.pdf>
44
-}
55

6+
{-# LANGUAGE CPP #-}
7+
68
module Cardano.Shell.NodeIPC
79
(-- * Data types
810
Port(..)
@@ -21,9 +23,11 @@ module Cardano.Shell.NodeIPC
2123
-- * Used for testing
2224
, sendMessage
2325
, readMessage
26+
#if !defined(mingw32_HOST_OS)
2427
, exampleWithFD
2528
, exampleWithProcess
2629
, getReadWriteHandles
30+
#endif
2731
-- * Predicates
2832
, isIPCException
2933
, isHandleClosed
@@ -32,9 +36,11 @@ module Cardano.Shell.NodeIPC
3236
, isNodeChannelCannotBeFound
3337
) where
3438

39+
#if !defined(mingw32_HOST_OS)
3540
import Cardano.Shell.NodeIPC.Example (exampleWithFD,
3641
exampleWithProcess,
3742
getReadWriteHandles)
43+
#endif
3844
import Cardano.Shell.NodeIPC.Lib (MessageSendFailure (..), MsgIn (..),
3945
MsgOut (..), NodeIPCException (..),
4046
Port (..), ProtocolDuration (..),

0 commit comments

Comments
 (0)